@Override protected ByteBuffer allocateBuffer(long size) { try { return file.channel().map(FileChannel.MapMode.READ_WRITE, 0, size); } catch (IOException ex) { IO.exception(ex); return null; } }
private int fillArray() { try { int x = source.read(buffer); idx = 0; buffLen = x; // Maybe -1 return x; } catch (IOException ex) { IO.exception(ex); return -1; } }