Reads next variable length block from input. @return int number of bytes stored in "buffer"
()
| 392 | * @return int number of bytes stored in "buffer" |
| 393 | */ |
| 394 | private int readBlock() { |
| 395 | blockSize = read(); |
| 396 | int n = 0; |
| 397 | int count; |
| 398 | if (blockSize > 0) { |
| 399 | try { |
| 400 | while (n<blockSize) { |
| 401 | count = in.read(block, n, blockSize-n); |
| 402 | if (count==-1) |
| 403 | break; |
| 404 | n += count; |
| 405 | } |
| 406 | } catch (IOException e) {} |
| 407 | |
| 408 | if (n < blockSize) |
| 409 | status = STATUS_FORMAT_ERROR; |
| 410 | } |
| 411 | return n; |
| 412 | } |
| 413 | |
| 414 | |
| 415 | /** |
no test coverage detected