MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / readBlock

Method readBlock

ij/src/main/java/ij/plugin/GIF_Reader.java:394–412  ·  view source on GitHub ↗

Reads next variable length block from input. @return int number of bytes stored in "buffer"

()

Source from the content-addressed store, hash-verified

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 /**

Callers 4

decodeImageDataMethod · 0.95
readContentsMethod · 0.95
readNetscapeExtMethod · 0.95
skipMethod · 0.95

Calls 2

readMethod · 0.95
readMethod · 0.65

Tested by

no test coverage detected