Package de.intarsys.tools.randomaccess
Class AbstractRandomAccess
java.lang.Object
de.intarsys.tools.randomaccess.AbstractRandomAccess
- All Implemented Interfaces:
IRandomAccess
- Direct Known Subclasses:
BufferedRandomAccess,RandomAccessByteArray,RandomAccessFile,RandomAccessFilter
Supports reading and writing to a random access data container. A random
access data container behaves like a large array of bytes.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAInputStreamview on the data structure.AOutputStreamview on the data structure.protected Stackvoidmark()Mark the current offset into the data in a stack like manner.voidreset()Reset to the last position on the mark-stack.
-
Constructor Details
-
AbstractRandomAccess
public AbstractRandomAccess()
-
-
Method Details
-
asInputStream
Description copied from interface:IRandomAccessAInputStreamview on the data structure.- Specified by:
asInputStreamin interfaceIRandomAccess- Returns:
- A
InputStreamview on the data structure.
-
asOutputStream
Description copied from interface:IRandomAccessAOutputStreamview on the data structure.- Specified by:
asOutputStreamin interfaceIRandomAccess- Returns:
- A
OutputStreamview on the data structure.
-
mark
Description copied from interface:IRandomAccessMark the current offset into the data in a stack like manner.- Specified by:
markin interfaceIRandomAccess- Throws:
IOException
-
reset
Description copied from interface:IRandomAccessReset to the last position on the mark-stack.- Specified by:
resetin interfaceIRandomAccess- Throws:
IOException
-
getPositionStack
- Returns:
- Returns the positionStack.
-