Package org.deckfour.xes.nikefs2
Interface NikeFS2RandomAccessStorage
-
- All Superinterfaces:
java.io.DataInput,java.io.DataOutput
- All Known Implementing Classes:
NikeFS2LazyRandomAccessStorageImpl,NikeFS2RandomAccessStorageImpl
public interface NikeFS2RandomAccessStorage extends java.io.DataOutput, java.io.DataInputThis interface specifies a random acess data storage container, pretty much the same asjava.util.RandomAccessFile.- Author:
- Christian W. Guenther (christian@deckfour.org)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Closes the data storage container.NikeFS2RandomAccessStoragecopy()Creates a clone, or copy, of this storage, having the exact same contents and the file pointer reset to zero.longgetFilePointer()Returns the current file pointer of the storage container.longlength()Returns the length, or size, in number of bytes currently used by this instance.voidseek(long pos)Repositions the offset, or file pointer, at which the next read or write operation will occur.intskipBytes(int n)Moves the offset, or file pointer, a specified number of bytes towards the end of the storage container.
-
-
-
Method Detail
-
close
void close() throws java.io.IOExceptionCloses the data storage container. After this method has been invoked, no further access to the represented instance is allowed.- Throws:
java.io.IOException
-
getFilePointer
long getFilePointer() throws java.io.IOExceptionReturns the current file pointer of the storage container. A file pointer is the offset in bytes, from the beginning of the sequential byte storage, at which the next read or write operation would occur.- Returns:
- Offset in bytes from beginning of storage.
- Throws:
java.io.IOException
-
length
long length() throws java.io.IOExceptionReturns the length, or size, in number of bytes currently used by this instance.- Returns:
- Number of bytes currently allocated.
- Throws:
java.io.IOException
-
seek
void seek(long pos) throws java.io.IOException
Repositions the offset, or file pointer, at which the next read or write operation will occur.- Parameters:
pos- The offset in bytes, at which the next operation will occur.- Throws:
java.io.IOException
-
skipBytes
int skipBytes(int n) throws java.io.IOExceptionMoves the offset, or file pointer, a specified number of bytes towards the end of the storage container.- Specified by:
skipBytesin interfacejava.io.DataInput- Throws:
java.io.IOException
-
copy
NikeFS2RandomAccessStorage copy() throws java.io.IOException
Creates a clone, or copy, of this storage, having the exact same contents and the file pointer reset to zero.- Throws:
java.io.IOException
-
-