private void setDumpBuffer(RandomAccessFile file) throws IOException { long length = file.length(); try { if (length > Integer.MAX_VALUE) { dumpBuffer = new LongMemoryMappedData(file, length); } else { dumpBuffer = new MemoryMappedData(file, length); } } catch (IOException ex) { if (ex.getCause() instanceof OutOfMemoryError) { dumpBuffer = new FileData(file, length); } else { throw ex; } } }
public byte getByte(long index) { return dumpBuffer[getBufferIndex(index)].get(getBufferOffset(index)); }
private void setDumpBuffer(RandomAccessFile file) throws IOException { long length = file.length(); try { if (length > Integer.MAX_VALUE) { dumpBuffer = new LongMemoryMappedData(file, length); } else { dumpBuffer = new MemoryMappedData(file, length); } } catch (IOException ex) { if (ex.getCause() instanceof OutOfMemoryError) { dumpBuffer = new FileData(file, length); } else { throw ex; } } }
private void setDumpBuffer(RandomAccessFile file) throws IOException { long length = file.length(); try { if (length > Integer.MAX_VALUE) { dumpBuffer = new LongMemoryMappedData(file, length); } else { dumpBuffer = new MemoryMappedData(file, length); } } catch (IOException ex) { if (ex.getCause() instanceof OutOfMemoryError) { dumpBuffer = new FileData(file, length); } else { throw ex; } } }
public void putLong(long index, long data) { dumpBuffer[getBufferIndex(index)].putLong(getBufferOffset(index),data); }
public void putInt(long index, int data) { dumpBuffer[getBufferIndex(index)].putInt(getBufferOffset(index),data); }
public void putByte(long index, byte data) { dumpBuffer[getBufferIndex(index)].put(getBufferOffset(index),data); }
public void putLong(long index, long data) { dumpBuffer[getBufferIndex(index)].putLong(getBufferOffset(index),data); }
public void putInt(long index, int data) { dumpBuffer[getBufferIndex(index)].putInt(getBufferOffset(index),data); }
public long getLong(long index) { return dumpBuffer[getBufferIndex(index)].getLong(getBufferOffset(index)); }
public int getInt(long index) { return dumpBuffer[getBufferIndex(index)].getInt(getBufferOffset(index)); }
public byte getByte(long index) { return dumpBuffer[getBufferIndex(index)].get(getBufferOffset(index)); }
public byte getByte(long index) { return dumpBuffer[getBufferIndex(index)].get(getBufferOffset(index)); }
public long getLong(long index) { return dumpBuffer[getBufferIndex(index)].getLong(getBufferOffset(index)); }
public int getInt(long index) { return dumpBuffer[getBufferIndex(index)].getInt(getBufferOffset(index)); }
public void putByte(long index, byte data) { dumpBuffer[getBufferIndex(index)].put(getBufferOffset(index),data); }
public void putByte(long index, byte data) { dumpBuffer[getBufferIndex(index)].put(getBufferOffset(index),data); }
public long getLong(long index) { return dumpBuffer[getBufferIndex(index)].getLong(getBufferOffset(index)); }
public void putLong(long index, long data) { dumpBuffer[getBufferIndex(index)].putLong(getBufferOffset(index),data); }
public int getInt(long index) { return dumpBuffer[getBufferIndex(index)].getInt(getBufferOffset(index)); }