org.neodatis.odb.core.layers.layer3
Interface IBufferedIO
- All Known Implementing Classes:
- MultiBufferedFileIO, MultiBufferedIO
public interface IBufferedIO
The interface for buffered IO
- Author:
- osmadja
goToPosition
void goToPosition(long position)
getLength
long getLength()
manageBufferForNewPosition
int manageBufferForNewPosition(long newPosition,
int readOrWrite,
int size)
- Checks if the new position is in the buffer, if not, flushes the buffer
and rebuilds it to the correct position
- Parameters:
newPosition
- readOrWrite
- size
- Size if the data that must be stored
- Returns:
- The index of the buffer where that contains the position
isUsingbuffer
boolean isUsingbuffer()
setUseBuffer
void setUseBuffer(boolean useBuffer)
getCurrentPosition
long getCurrentPosition()
setCurrentWritePosition
void setCurrentWritePosition(long currentPosition)
setCurrentReadPosition
void setCurrentReadPosition(long currentPosition)
writeByte
void writeByte(byte b)
readBytesOld
byte[] readBytesOld(int size)
readBytes
byte[] readBytes(int size)
readByte
byte readByte()
writeBytes
void writeBytes(byte[] bytes)
flushBuffer
void flushBuffer(int bufferIndex)
flushAllBuffers
void flushAllBuffers()
flushIO
void flushIO()
throws java.io.IOException
- Throws:
java.io.IOException
getIoDeviceLength
long getIoDeviceLength()
setIoDeviceLength
void setIoDeviceLength(long ioDeviceLength)
close
void close()
clear
void clear()
delete
boolean delete()
isForTransaction
boolean isForTransaction()
enableAutomaticDelete
void enableAutomaticDelete(boolean yesOrNo)
automaticDeleteIsEnabled
boolean automaticDeleteIsEnabled()