Lines 848-854
Link Here
|
848 |
// how many characters can be decoded without refilling the buffer? |
848 |
// how many characters can be decoded without refilling the buffer? |
849 |
int charsInBuffer = i + ((this.bufferEnd - this.bufferIndex) / 3); |
849 |
int charsInBuffer = i + ((this.bufferEnd - this.bufferIndex) / 3); |
850 |
// all the characters must already be in the buffer if we're at the end of the stream |
850 |
// all the characters must already be in the buffer if we're at the end of the stream |
851 |
if (charsInBuffer > length || this.bufferEnd != this.streamBuffer.length) |
851 |
if (charsInBuffer > length || this.bufferEnd != this.streamBuffer.length || stream == null) |
852 |
charsInBuffer = length; |
852 |
charsInBuffer = length; |
853 |
while (i < charsInBuffer) { |
853 |
while (i < charsInBuffer) { |
854 |
byte b = this.streamBuffer[this.bufferIndex++]; |
854 |
byte b = this.streamBuffer[this.bufferIndex++]; |