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 TypeMethodDescriptionAInputStream
view on the data structure.AOutputStream
view on the data structure.protected Stack
void
mark()
Mark the current offset into the data in a stack like manner.void
reset()
Reset to the last position on the mark-stack.
-
Constructor Details
-
AbstractRandomAccess
public AbstractRandomAccess()
-
-
Method Details
-
asInputStream
Description copied from interface:IRandomAccess
AInputStream
view on the data structure.- Specified by:
asInputStream
in interfaceIRandomAccess
- Returns:
- A
InputStream
view on the data structure.
-
asOutputStream
Description copied from interface:IRandomAccess
AOutputStream
view on the data structure.- Specified by:
asOutputStream
in interfaceIRandomAccess
- Returns:
- A
OutputStream
view on the data structure.
-
mark
Description copied from interface:IRandomAccess
Mark the current offset into the data in a stack like manner.- Specified by:
mark
in interfaceIRandomAccess
- Throws:
IOException
-
reset
Description copied from interface:IRandomAccess
Reset to the last position on the mark-stack.- Specified by:
reset
in interfaceIRandomAccess
- Throws:
IOException
-
getPositionStack
- Returns:
- Returns the positionStack.
-