this.buffer.clear();
j = this.in.readLine(this.buffer);
if (j == -1)
return 0;
if (!this.buffer.isEmpty())
throw new MalformedChunkCodingException("Unexpected content at the end of chunk");
this.state = 1;
case 1:
this.buffer.clear();
j = this.in.readLine(this.buffer);
if (j == -1)
return 0;
int k = this.buffer.indexOf(59);
if (k < 0)
k = this.buffer.length();
try
{
return Integer.parseInt(this.buffer.substringTrimmed(0, k), 16);
}
catch (NumberFormatException localNumberFormatException)
{
throw new MalformedChunkCodingException("Bad chunk header");
}
}
throw new IllegalStateException("Inconsistent codec state");
}