public int read(byte b[], int off, int len) throws IOException { if (!atEOF()) { int rc = 0; while (!atEOF() && rc < len) { len = Math.min(len, chunk.length - chunk.offset); if (len > 0) { System.arraycopy(chunk.data, chunk.offset, b, off, len); chunk.offset += len; } rc += len; } return rc; } else { return -1; } }
private Page page = readPage(p); private int pageCount = 1;
private Page page = readPage(p); private int pageCount = 1;
private Page page = readPage(p); private int pageCount = 1;
public int read(byte b[], int off, int len) throws IOException { if (!atEOF()) { int rc = 0; while (!atEOF() && rc < len) { len = Math.min(len, chunk.length - chunk.offset); if (len > 0) { System.arraycopy(chunk.data, chunk.offset, b, off, len); chunk.offset += len; } rc += len; } return rc; } else { return -1; } }
public int read(byte b[], int off, int len) throws IOException { if (!atEOF()) { int rc = 0; while (!atEOF() && rc < len) { len = Math.min(len, chunk.length - chunk.offset); if (len > 0) { System.arraycopy(chunk.data, chunk.offset, b, off, len); chunk.offset += len; } rc += len; } return rc; } else { return -1; } }
public int read(byte b[], int off, int len) throws IOException { if (!atEOF()) { int rc = 0; while (!atEOF() && rc < len) { len = Math.min(len, chunk.length - chunk.offset); if (len > 0) { System.arraycopy(chunk.data, chunk.offset, b, off, len); chunk.offset += len; } rc += len; } return rc; } else { return -1; } }
public int read(byte[] b) throws IOException { return read(b, 0, b.length); }
public int read(byte[] b) throws IOException { return read(b, 0, b.length); }
public int read(byte[] b) throws IOException { return read(b, 0, b.length); }
private void fill() throws IOException { page = readPage(new Page(page.getNext())); pageCount++; }
private void fill() throws IOException { page = readPage(new Page(page.getNext())); pageCount++; }
public int read() throws IOException { if (!atEOF()) { return chunk.data[chunk.offset++] & 0xff; } else { return -1; } }
private void fill() throws IOException { page = readPage(new Page(page.getNext())); pageCount++; }
private boolean atEOF() throws IOException { if (chunk.offset < chunk.length) { return false; } if (page.getType() == Page.PAGE_END_TYPE) { return true; } fill(); return chunk.offset >= chunk.length; }
public int read() throws IOException { if (!atEOF()) { return chunk.data[chunk.offset++] & 0xff; } else { return -1; } }
public int read() throws IOException { if (!atEOF()) { return chunk.data[chunk.offset++] & 0xff; } else { return -1; } }