public FileStorageInputStream(FileStorage fileStorage, DataHandler handler, boolean compression, boolean alwaysClose) { this.fileStorage = fileStorage; this.alwaysClose = alwaysClose; if (compression) { compress = CompressTool.getInstance(); } else { compress = null; } page = DataBuffer.create(handler, Constants.FILE_BLOCK_SIZE); try { if (fileStorage.length() <= FileStorage.HEADER_LENGTH) { close(); } else { fillBuffer(); } } catch (IOException e) { throw DbException.convertIOException(e, fileStorage.name); } }
byte[] salt; byte[] magic = HEADER.getBytes(); if (length() < HEADER_LENGTH) {
if (fileStorage.length() == fileStorage.getFilePointer()) { close(); return;