@Override public int read() throws IOException { fillBuffer(); if (endOfFile) { return -1; } int i = page.readByte() & 0xff; remainingInBuffer--; return i; }
private int readBlock(byte[] buff, int off, int len) throws IOException { fillBuffer(); if (endOfFile) { return -1; } int l = Math.min(remainingInBuffer, len); page.read(buff, off, l); remainingInBuffer -= l; return l; }
public FileStoreInputStream(FileStore store, DataHandler handler, boolean compression, boolean alwaysClose) { this.store = store; this.alwaysClose = alwaysClose; if (compression) { compress = CompressTool.getInstance(); } else { compress = null; } page = Data.create(handler, Constants.FILE_BLOCK_SIZE); try { if (store.length() <= FileStore.HEADER_LENGTH) { close(); } else { fillBuffer(); } } catch (IOException e) { throw DbException.convertIOException(e, store.name); } }
public int read() throws IOException { fillBuffer(); if (endOfFile) { return -1; } int i = page.readByte() & 0xff; remainingInBuffer--; return i; }
private int readBlock(byte[] buff, int off, int len) throws IOException { fillBuffer(); if (endOfFile) { return -1; } int l = Math.min(remainingInBuffer, len); page.read(buff, off, l); remainingInBuffer -= l; return l; }
public int readBlock(byte[] buff, int off, int len) throws IOException { fillBuffer(); if (endOfFile) { return -1; } int l = Math.min(remainingInBuffer, len); page.read(buff, off, l); remainingInBuffer -= l; return l; }
private int readBlock(byte[] buff, int off, int len) throws IOException { fillBuffer(); if (endOfFile) { return -1; } int l = Math.min(remainingInBuffer, len); page.read(buff, off, l); remainingInBuffer -= l; return l; }
@Override public int read() throws IOException { fillBuffer(); if (endOfFile) { return -1; } int i = page.readByte() & 0xff; remainingInBuffer--; return i; }
@Override public int read() throws IOException { fillBuffer(); if (endOfFile) { return -1; } int i = page.readByte() & 0xff; remainingInBuffer--; return i; }
public FileStoreInputStream(FileStore store, DataHandler handler, boolean compression, boolean alwaysClose) throws SQLException { this.store = store; this.alwaysClose = alwaysClose; if (compression) { compress = CompressTool.getInstance(); } page = DataPage.create(handler, Constants.FILE_BLOCK_SIZE); try { if (store.length() <= FileStore.HEADER_LENGTH) { close(); } else { fillBuffer(); } } catch (IOException e) { throw Message.convertIOException(e, store.name); } }
public FileStoreInputStream(FileStore store, DataHandler handler, boolean compression, boolean alwaysClose) { this.store = store; this.alwaysClose = alwaysClose; if (compression) { compress = CompressTool.getInstance(); } else { compress = null; } page = Data.create(handler, Constants.FILE_BLOCK_SIZE); try { if (store.length() <= FileStore.HEADER_LENGTH) { close(); } else { fillBuffer(); } } catch (IOException e) { throw DbException.convertIOException(e, store.name); } }
public FileStoreInputStream(FileStore store, DataHandler handler, boolean compression, boolean alwaysClose) { this.store = store; this.alwaysClose = alwaysClose; if (compression) { compress = CompressTool.getInstance(); } else { compress = null; } page = Data.create(handler, Constants.FILE_BLOCK_SIZE); try { if (store.length() <= FileStore.HEADER_LENGTH) { close(); } else { fillBuffer(); } } catch (IOException e) { throw DbException.convertIOException(e, store.name); } }