public class BundleReader extends Object implements BundleStreamSource
BundleStreamSource.Event
Modifier and Type | Field and Description |
---|---|
(package private) MappedByteBuffer |
buffer
The stream buffer.
|
(package private) ArrayList<Object> |
data
Current object.
|
(package private) FileChannel |
input
Input channel.
|
static int |
MAGIC
Magic number, shared with
BundleReader . |
(package private) BundleMeta |
meta
Bundle metadata.
|
(package private) ArrayList<ByteBufferSerializer<?>> |
sers
Serializers to use.
|
Constructor and Description |
---|
BundleReader(FileChannel input)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Object |
data(int rnum)
Access a particular object and representation.
|
BundleMeta |
getMeta()
Get the current meta data.
|
BundleStreamSource.Event |
nextEvent()
Get the next event
|
(package private) void |
openBuffer()
Map the input file.
|
(package private) void |
readMeta()
Read the metadata.
|
(package private) void |
readObject()
Read an object.
|
public static final int MAGIC
BundleReader
.MappedByteBuffer buffer
BundleMeta meta
FileChannel input
ArrayList<ByteBufferSerializer<?>> sers
public BundleReader(FileChannel input)
input
- Input channelpublic BundleMeta getMeta()
BundleStreamSource
getMeta
in interface BundleStreamSource
void openBuffer()
void readMeta()
void readObject()
public BundleStreamSource.Event nextEvent()
BundleStreamSource
nextEvent
in interface BundleStreamSource
public Object data(int rnum)
BundleStreamSource
data
in interface BundleStreamSource
rnum
- Representation number