{@inheritDoc}
()
| 118 | * {@inheritDoc} |
| 119 | */ |
| 120 | @Override |
| 121 | public int read() throws IOException { |
| 122 | if (bufferOffset >= remainingBufferBytes) { |
| 123 | remainingBufferBytes = read(buffer, 0, buffer.length); |
| 124 | bufferOffset = 0; |
| 125 | if (remainingBufferBytes == END_OF_STREAM_MARKER) { |
| 126 | // Both Java and C# return the same value for EOF on single-byte read. |
| 127 | return -1; |
| 128 | } |
| 129 | } |
| 130 | return buffer[bufferOffset++] & 0xFF; |
| 131 | } |
| 132 | |
| 133 | /** |
| 134 | * {@inheritDoc} |