Appends a single byte to this chunk. @param b the byte to append @throws IOException if writing fails
(byte b)
| 297 | * @throws IOException if writing fails |
| 298 | */ |
| 299 | public void append(byte b) throws IOException { |
| 300 | makeSpace(1); |
| 301 | int limit = getLimitInternal(); |
| 302 | |
| 303 | // couldn't make space |
| 304 | if (end >= limit) { |
| 305 | flushBuffer(); |
| 306 | } |
| 307 | buff[end++] = b; |
| 308 | } |
| 309 | |
| 310 | |
| 311 | /** |