(int c)
| 38 | } |
| 39 | |
| 40 | public void write(int c) { |
| 41 | if (buffer == null) { |
| 42 | buffer = new byte[BufferSize]; |
| 43 | } else if (position >= buffer.length) { |
| 44 | flushBuffer(); |
| 45 | buffer = new byte[BufferSize]; |
| 46 | } |
| 47 | |
| 48 | buffer[position++] = (byte) (c & 0xFF); |
| 49 | ++ length; |
| 50 | } |
| 51 | |
| 52 | private byte[] copy(byte[] b, int offset, int length) { |
| 53 | byte[] array = new byte[length]; |