return;
}
final int cr = this.buffer.read();
final int lf = this.buffer.read();
if (cr != HTTP.CR || lf != HTTP.LF) {
throw new MalformedChunkCodingException("CRLF expected at end of chunk");
}
this.endOfChunk = false;
}
if (this.lineBuf == null) {
this.lineBuf = new CharArrayBuffer(32);
} else {
this.lineBuf.clear();
}
if (this.buffer.readLine(this.lineBuf, this.endOfStream)) {
int separator = this.lineBuf.indexOf(';');
if (separator < 0) {
separator = this.lineBuf.length();
}
try {
final String s = this.lineBuf.substringTrimmed(0, separator);
this.chunkSize = Integer.parseInt(s, 16);
} catch (final NumberFormatException e) {
throw new MalformedChunkCodingException("Bad chunk header");
}
this.pos = 0;
}
}