org.neodatis.odb.core.layers.layer3
Interface IBufferedIO
-
- All Known Implementing Classes:
- MultiBufferedFileIO, MultiBufferedIO
public interface IBufferedIOThe interface for buffered IO
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description booleanautomaticDeleteIsEnabled()voidclear()voidclose()booleandelete()voidenableAutomaticDelete(boolean yesOrNo)voidflushAllBuffers()voidflushBuffer(int bufferIndex)voidflushIO()longgetCurrentPosition()longgetIoDeviceLength()longgetLength()voidgoToPosition(long position)booleanisForTransaction()booleanisUsingbuffer()intmanageBufferForNewPosition(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 positionbytereadByte()byte[]readBytes(int size)byte[]readBytesOld(int size)voidsetCurrentReadPosition(long currentPosition)voidsetCurrentWritePosition(long currentPosition)voidsetIoDeviceLength(long ioDeviceLength)voidsetUseBuffer(boolean useBuffer)voidwriteByte(byte b)voidwriteBytes(byte[] bytes)
-
-
-
Method Detail
-
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()
-
-
DataMelt 3.0 © DataMelt by jWork.ORG