Parse the bytes <code>8</code> till <code>11</code> in the Basic Header Segment.

@param line The actual line
@throws InternetSCSIException If any violation of the iSCSI-Standard emerge.
774844
protected void deserializeBytes8to11 (final int line) throws InternetSCSIException {

        logicalUnitNumber = Utils.getUnsignedLong(line);
        logicalUnitNumber <<= Constants.FOUR_BYTES_SHIFT;
    }
762779
private void parseFile(File file) throws Exception {
        int lineNumber = 1;
        String line = null;
        BufferedReader in = null;
        try {
            in = new BufferedReader(new FileReader(file));
            List<TZDBZone> openZone = null;
            for ( ; (line = in.readLine()) != null; lineNumber++) {
                int index = line.indexOf('#');  // remove comments (doesn't handle # in quotes)
                if (index >= 0) {
                    line = line.substring(0, index);
                }
                if (line.trim().length() == 0) {  // ignore blank lines
                    continue;
                }
                StringTokenizer st = new StringTokenizer(line, " \t");
                if (openZone != null && Character.isWhitespace(line.charAt(0)) && st.hasMoreTokens()) {
                    if (parseZoneLine(st, openZone)) {
                        openZone = null;
                    }
                } else {
                    if (st.hasMoreTokens()) {
                        String first = st.nextToken();
                        if (first.equals("Zone")) {
                            if (st.countTokens() < 3) {
                                printVerbose("Invalid Zone line in file: " + file + ", line: " + line);
                                throw new IllegalArgumentException("Invalid Zone line");
                            }
                            openZone = new ArrayList<TZDBZone>();
                            zones.put(st.nextToken(), openZone);
                            if (parseZoneLine(st, openZone)) {
                                openZone = null;
                            }
                        } else {
                            openZone = null;
                            if (first.equals("Rule")) {
                                if (st.countTokens() < 9) {
                                    printVerbose("Invalid Rule line in file: " + file + ", line: " + line);
                                    throw new IllegalArgumentException("Invalid Rule line");
                                }
                                parseRuleLine(st);

                            } else if (first.equals("Link")) {
                                if (st.countTokens() < 2) {
                                    printVerbose("Invalid Link line in file: " + file + ", line: " + line);
                                    throw new IllegalArgumentException("Invalid Link line");
                                }
                                String realId = st.nextToken();
                                String aliasId = st.nextToken();
                                links.put(aliasId, realId);

                            } else {
                                throw new IllegalArgumentException("Unknown line");
                            }
                        }
                    }
                }
            }
        } catch (Exception ex) {
            throw new Exception("Failed while processing file '" + file + "' on line " + lineNumber + " '" + line + "'", ex);
        } finally {
            if (in != null) {
                in.close();
            }
        }
    }
865622
protected static E164CountryCode parse(String line) throws IOException {
        try {
            int pos = line.indexOf(' ');
            if (pos < 0) throw new IOException("Invalid format, could not parse prefix");
            String prefix = line.substring(0, pos);

            // rest of line is iso
            String iso = line.substring(pos+1).trim();

            // was there a name?
            if (iso == null || iso.equals("")) {
                throw new IOException("Country ISO was null or empty");
            }

            // create the new country code
            return new E164CountryCode(prefix, iso);
        } catch (Exception e) {
            throw new IOException("Failed while parsing country code for line: " + line, e);
        }
    }
322786
private static function parseHeaderLine(&$headers, $line)
    {
        $parts = explode(':', $line, 2);
        if (count($parts) == 1) {
            return;
        }

        list($name, $value) = $parts;
        $headers[trim($name)] = trim($value);
    }
952515
protected static Country parse(String line) throws IOException {
        try {
            int pos = line.indexOf(' ');
            if (pos < 0) throw new IOException("Invalid format, could not parse 2 char code");
            String code2 = line.substring(0, pos);
            int pos2 = line.indexOf(' ', pos+1);
            if (pos2 < 0) throw new IOException("Invalid format, could not parse 3 char code");
            String code3 = line.substring(pos+1, pos2);
            int pos3 = line.indexOf(' ', pos2+1);
            if (pos3 < 0) throw new IOException("Invalid format, could not parse 3 char digit code");
            String num3 = line.substring(pos2+1, pos3);
            // rest of line is the long name
            String longName = line.substring(pos3+1).trim();
            // was there a name?
            if (longName == null || longName.equals("")) {
                throw new IOException("Country name was null or empty");
            }

            // parse long name into its short name (strip anything after the last comma)
            String name = longName;
            int pos4 = longName.lastIndexOf(',');
            if (pos4 > 0) {
                // strip out the final part such as ", Republic of" from something like "Nigeria, Republic Of"
                name = longName.substring(0, pos4);
            }

            // create the new country
            return new Country(code2, name, longName);
        } catch (Exception e) {
            throw new IOException("Failed while parsing country for line: " + line, e);
        }
    }
598843
@Override
    public boolean parseBinaryFirstLine(WsByteBuffer buff) throws MalformedMessageException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "parseBinaryFirstLine for " + this);
            Tr.debug(tc, "Buffer: " + buff);
        }
        // check the version first if we need to
        if (getBinaryParseState() == HttpInternalConstants.PARSING_BINARY_VERSION) {
            if (!buff.hasRemaining()) {
                return false;
            }
            byte version = buff.get();
            if (version != HttpInternalConstants.BINARY_TRANSPORT_V1) {
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                    Tr.debug(tc, "Unsupported binary version in message: " + version);
                }
                throw new MalformedMessageException("Invalid binary message");
            }
            setBinaryParseState(HttpInternalConstants.PARSING_VERSION_ID_OR_LEN);
            resetCacheToken(4);
        }

        // stop parsing the FirstLine when we have parsed the status or the
        // reason header or we hit the end of the buffer and need to read more
        boolean lineEnds = false;
        int value;
        while (!lineEnds) {
            // at this point, the parsed token array is always set up, so we
            // can try to fill it now
            if (!fillCacheToken(buff)) {
                return false;
            }
            switch (getBinaryParseState()) {
                case HttpInternalConstants.PARSING_VERSION_ID_OR_LEN:
                    value = GenericUtils.asInt(getParsedToken());
                    if (0 == (value & GenericConstants.KNOWN_MASK)) {
                        // known version ordinal
                        setVersion(VersionValues.getByOrdinal(value));
                        setBinaryParseState(HttpInternalConstants.PARSING_STATUS);
                        resetCacheToken(4);
                    } else {
                        // unknown version length
                        setBinaryParseState(HttpInternalConstants.PARSING_UNKNOWN_VERSION);
                        resetCacheToken(value & GenericConstants.UNKNOWN_MASK);
                    }
                    break;

                case HttpInternalConstants.PARSING_UNKNOWN_VERSION:
                    setVersion(VersionValues.find(getParsedToken()));
                    setBinaryParseState(HttpInternalConstants.PARSING_STATUS);
                    createCacheToken(4);
                    break;

                case HttpInternalConstants.PARSING_STATUS:
                    setStatusCode(GenericUtils.asInt(getParsedToken()));
                    setBinaryParseState(HttpInternalConstants.PARSING_REASON_LEN);
                    resetCacheToken(4);
                    break;

                case HttpInternalConstants.PARSING_REASON_LEN:
                    value = GenericUtils.asInt(getParsedToken());
                    if (0 == value) {
                        // end of first line response headers
                        setBinaryParseState(GenericConstants.PARSING_HDR_FLAG);
                        resetCacheToken(4);
                        lineEnds = true;
                    } else {
                        setBinaryParseState(HttpInternalConstants.PARSING_REASON);
                        resetCacheToken(value);
                    }
                    break;

                case HttpInternalConstants.PARSING_REASON:
                    setReasonPhrase(getParsedToken());
                    setBinaryParseState(GenericConstants.PARSING_HDR_FLAG);
                    createCacheToken(4);
                    lineEnds = true;
                    break;

                default:
                    throw new MalformedMessageException("Invalid state in line: " + getBinaryParseState());
            } // end of switch

        } // end of while loop

        setFirstLineComplete(true);
        return true;
    }
1205516
def _parse_line(line=''):
    '''
    
    '''
    parts = line.split()
    key = parts.pop(0)
    value = ' '.join(parts)
    return key, value
323034
public int readLine(byte[] b,int off,int len)
        throws IOException
    {
        len=fillLine(len);

        if (len<0)
            return -1;
        if (len==0)
            return 0;
        
        System.arraycopy(_buf,_mark, b, off, len);
        _mark=-1;

        return len;
    }
72956
@Override
	protected final void processLine(String line, int level) {
		boolean isError = doProcessLine(line, level);
		if (isErrorStream || isError) {
			errorCount++;
		}
		lineCount++;
	}
1150707
protected void parse()
	throws IOException {

	String line;
	line = _reader.readLine();
	if (logger.isTraceEnabled()) {
	    logger.trace(line);
	}
	parseHead(line);

	while ( (line = _reader.readLine()).length() != 0 ) {
	    if (logger.isTraceEnabled()) {
		logger.trace(line);
	    }

	    if (line.startsWith(HTTPProtocol.CONNECTION)) {
		_connection = getRest(line, HTTPProtocol.CONNECTION.length());
	    } else if (line.startsWith(HTTPProtocol.SERVER)) {
		_server = getRest(line, HTTPProtocol.SERVER.length());
	    } else if (line.startsWith(HTTPProtocol.CONTENT_TYPE)) {
		_contentType = getRest(line, HTTPProtocol.CONTENT_TYPE.length());
	    } else if (line.startsWith(HTTPProtocol.CONTENT_LENGTH)) {
		_contentLength = Long.parseLong(getRest(line,
							HTTPProtocol.CONTENT_LENGTH.length()));
	    } else if (line.startsWith(HTTPProtocol.HOST)){
		_host = getRest(line, HTTPProtocol.HOST.length());
	    } else if (line.startsWith(HTTPProtocol.CHUNKED)) {
		_chunked = true;
	    }

	}
    }
757044
private int parseByte()
        throws IOException
    {
        while (_chunkLength <= 0) {
            if (_isLastChunk) {
                return -1;
            }

            int code = read();

            switch (code) {
                case 'b':
                    _isLastChunk = false;

                    _chunkLength = (read() << 8) + read();
                    break;

                case 'B':
                    _isLastChunk = true;

                    _chunkLength = (read() << 8) + read();
                    break;

                default:
                    throw expect("byte[]", code);
            }
        }

        _chunkLength--;

        return read();
    }
777616
private void parse(String header)
   {
      ArrayList<String> list = new ArrayList<String>(4);
      StringBuilder sb = new StringBuilder();
      int index = 1;
      while (index < header.length())
      {
         char c = header.charAt(index++);
         if (Character.isDigit(c))
         {
            sb.append(c);
         }
         else
         {
            if (sb.length() != 0)
            {
               list.add(sb.toString());
               sb.setLength(0);
            }
         }
      }

      if (sb.length() != 0)
      {
         list.add(sb.toString());
      }

      m_id = list.get(0);
      m_sequence = Integer.parseInt(list.get(1));
      m_type = Integer.valueOf(list.get(2));
      if (list.size() > 3)
      {
         m_subtype = Integer.parseInt(list.get(3));
      }
   }
1192737
async def read_line(stream: asyncio.StreamReader) -> bytes:
    
    # Security: this is bounded by the StreamReader's limit (default = 32 KiB).
    line = await stream.readline()
    # Security: this guarantees header values are small (hard-coded = 4 KiB)
    if len(line) > MAX_LINE:
        raise ValueError("Line too long")
    # Not mandatory but safe - https://tools.ietf.org/html/rfc7230#section-3.5
    if not line.endswith(b"\r\n"):
        raise ValueError("Line without CRLF")
    return line[:-2]
804328
private int parseLength() throws IOException {
        int curLen = 0;
        if (dataPos == dataSize)
            return curLen;
        int lenByte = data[dataPos++] & 0xff;
        if (isIndefinite(lenByte)) {
            ndefsList.add(new Integer(dataPos));
            unresolved++;
            return curLen;
        }
        if (isLongForm(lenByte)) {
            lenByte &= LEN_MASK;
            if (lenByte > 4) {
                throw new IOException("Too much data");
            }
            if ((dataSize - dataPos) < (lenByte + 1)) {
                throw new IOException("Too little data");
            }
            for (int i = 0; i < lenByte; i++) {
                curLen = (curLen << 8) + (data[dataPos++] & 0xff);
            }
            if (curLen < 0) {
                throw new IOException("Invalid length bytes");
            }
        } else {
           curLen = (lenByte & LEN_MASK);
        }
        return curLen;
    }
462692
public void parseTagedLine(String line) {
		String[] toks = line.split("(\\s|　| |\\t)+");
		words = new String[toks.length];
		tags = new String[toks.length];
		for(int i=0;i<toks.length;i++){
			String[] tt = toks[i].split("/");
			if(tt.length!=2)
				System.err.println("Wrong Format");
			words[i] = tt[0];
			tags[i]=tt[1];
		}
		
		
	}
155678
public void read(ByteCodeParser in)
    throws IOException
  {
    int length = in.readInt();
    
    _maxStack = in.readShort();
    _maxLocals = in.readShort();

    int codeLength = in.readInt();

    _code = new byte[codeLength];
    in.read(_code, 0, codeLength);

    int exnCount = in.readShort();

    for (int i = 0; i < exnCount; i++) {
      ExceptionItem exn = new ExceptionItem();

      exn.setStart(in.readShort() & 0xffff);
      exn.setEnd(in.readShort() & 0xffff);
      exn.setHandler(in.readShort() & 0xffff);
      exn.setType(in.readShort() & 0xffff);

      _exceptions.add(exn);
    }

    int attrCount = in.readShort();

    for (int i = 0; i < attrCount; i++) {
      Attribute attr = in.parseAttribute();

      _attributes.add(attr);
    }
  }
678954
private function parseHeaderLine($line)
    {
        $matches = [];
        if (preg_match('/^([^:]+):(.*)$/', $line, $matches) === 1) {
            $this->addHeader(trim($matches[1]), trim($matches[2]));
        }
    }