/** * This method is used to convert the size in hexidecimal to a * decimal <code>int</code>. This will use the specified number * of bytes from the internal buffer and parse each character * read as a hexidecimal character. This stops interpreting the * size line when a non-hexidecimal character is encountered. */ private void parse() throws IOException { int off = 0; while(off < count) { int octet = toDecimal(line[off]); if(octet < 0){ if(off < 1) { throw new IOException("Invalid chunk size line"); } break; } chunk <<= 4; chunk ^= octet; off++; } count = 0; }
/** * This method is used to convert the size in hexidecimal to a * decimal <code>int</code>. This will use the specified number * of bytes from the internal buffer and parse each character * read as a hexidecimal character. This stops interpreting the * size line when a non-hexidecimal character is encountered. */ private void parse() throws IOException { int off = 0; while(off < count) { int octet = toDecimal(line[off]); if(octet < 0){ if(off < 1) { throw new IOException("Invalid chunk size line"); } break; } chunk <<= 4; chunk ^= octet; off++; } count = 0; }
/** * This method is used to convert the size in hexidecimal to a * decimal <code>int</code>. This will use the specified number * of bytes from the internal buffer and parse each character * read as a hexidecimal character. This stops interpreting the * size line when a non-hexidecimal character is encountered. */ private void parse() throws IOException { int off = 0; while(off < count) { int octet = toDecimal(line[off]); if(octet < 0){ if(off < 1) { throw new IOException("Invalid chunk size line"); } break; } chunk <<= 4; chunk ^= octet; off++; } count = 0; }