Package | Description |
---|---|
org.jlab.coda.hipo |
Modifier and Type | Method and Description |
---|---|
void |
WriterMT.addEvent(byte[] buffer)
Add a byte array to the current internal record.
|
void |
WriterMT.addEvent(byte[] buffer,
int offset,
int length)
Add a byte array to the current internal record.
|
void |
Writer.addEvent(java.nio.ByteBuffer buffer)
Add a ByteBuffer to the internal record.
|
void |
WriterMT.addEvent(java.nio.ByteBuffer buffer)
Add a ByteBuffer to the internal record.
|
void |
WriterMT.addEvent(EvioBank bank)
Add an EvioBank to the internal record.
|
void |
Writer.addEvent(EvioNode node)
Add an EvioNode to the internal record.
|
void |
WriterMT.addEvent(EvioNode node)
Add an EvioNode to the internal record.
|
boolean |
RecordOutputStream.addEvent(EvioNode node)
Adds an event's ByteBuffer into the record.
|
boolean |
RecordOutputStream.addEvent(EvioNode node,
int extraDataLen)
Adds an event's ByteBuffer into the record.
|
java.nio.ByteBuffer |
Reader.addStructure(int eventNumber,
java.nio.ByteBuffer addBuffer)
This method adds an evio container (bank, segment, or tag segment) as the last
structure contained in an event.
|
static int |
Compressor.compressLZ4(byte[] src,
int srcOff,
int srcSize,
byte[] dst,
int dstOff,
int maxSize)
Fastest LZ4 compression.
|
static int |
Compressor.compressLZ4(java.nio.ByteBuffer src,
int srcSize,
java.nio.ByteBuffer dst,
int maxSize)
Fastest LZ4 compression.
|
static int |
Compressor.compressLZ4(java.nio.ByteBuffer src,
int srcOff,
int srcSize,
java.nio.ByteBuffer dst,
int dstOff,
int maxSize)
Fastest LZ4 compression.
|
static int |
Compressor.compressLZ4Best(byte[] src,
int srcOff,
int srcSize,
byte[] dst,
int dstOff,
int maxSize)
Highest LZ4 compression.
|
static int |
Compressor.compressLZ4Best(java.nio.ByteBuffer src,
int srcSize,
java.nio.ByteBuffer dst,
int maxSize)
Highest LZ4 compression.
|
static int |
Compressor.compressLZ4Best(java.nio.ByteBuffer src,
int srcOff,
int srcSize,
java.nio.ByteBuffer dst,
int dstOff,
int maxSize)
Highest LZ4 compression.
|
static void |
TestWriter.createEmptyFile() |
java.nio.ByteBuffer |
Writer.createHeader(byte[] userHeader)
Create and return a buffer containing a general file header
followed by the user header given in the argument.
|
java.nio.ByteBuffer |
Writer.createHeader(java.nio.ByteBuffer userHeader)
Create and return a buffer containing a general file header
followed by the user header given in the argument.
|
static void |
Reader.findRecordInfo(java.nio.ByteBuffer buf,
int offset,
int[] info)
Reads data from a record header in order to determine things
like the bitInfo word, various lengths, etc.
|
void |
Reader.forceScanFile()
Scan file to find all records and store their position, length, and event count.
|
java.nio.ByteBuffer |
RecordInputStream.getEvent(java.nio.ByteBuffer buffer,
int index)
Get the event at the given index and write it into the given byte buffer.
|
java.nio.ByteBuffer |
Reader.getEvent(java.nio.ByteBuffer buf,
int index)
Get a byte array representing the specified event from the file/buffer
and place it in the given buf.
|
java.nio.ByteBuffer |
RecordInputStream.getEvent(java.nio.ByteBuffer buffer,
int bufOffset,
int index)
Get the event at the given index and write it into the given byte buffer.
|
byte[] |
Reader.getEvent(int index)
Get a byte array representing the specified event from the file/buffer.
|
byte[] |
Reader.getNextEvent()
Get a byte array representing the next event from the file/buffer while sequentially reading.
|
byte[] |
Reader.getPrevEvent()
Get a byte array representing the previous event from the sequential queue.
|
java.nio.ByteBuffer |
RecordInputStream.getUserHeader(java.nio.ByteBuffer buffer,
int bufOffset)
Get any existing user header and write it into the given byte buffer.
|
RecordInputStream |
RecordInputStream.getUserHeaderAsRecord(java.nio.ByteBuffer buffer,
int bufOffset)
Get any existing user header and write it into the given byte buffer.
|
static boolean |
RecordHeader.isCompressed(java.nio.ByteBuffer buffer,
int offset)
Quickly check to see if this buffer contains compressed data or not.
|
void |
Writer.open(java.nio.ByteBuffer buf,
byte[] userHeader)
Specify a buffer and write first record header with given user header.
|
void |
Writer.open(java.nio.ByteBuffer buf,
byte[] userHdr,
int off,
int len)
Specify a buffer and write first record header with given user header.
|
void |
Writer.open(java.lang.String filename)
Open a new file and write file header with no user header.
|
void |
WriterMT.open(java.lang.String filename)
Open a new file and write file header with no user header.
|
void |
Reader.open(java.lang.String filename)
Opens an input stream in binary mode.
|
void |
Reader.open(java.lang.String filename,
boolean scan)
Opens an input stream in binary mode.
|
void |
Writer.open(java.lang.String filename,
byte[] userHeader)
Open a file and write file header with given user header.
|
void |
WriterMT.open(java.lang.String filename,
byte[] userHdr)
Open a file and write file header with given user's header.
|
void |
FileHeader.readHeader(java.nio.ByteBuffer buffer)
Reads the file header information from a byte buffer and validates
it by checking the magic word (8th word).
|
void |
RecordHeader.readHeader(java.nio.ByteBuffer buffer)
Reads the header information from a byte buffer and validates
it by checking the magic word (8th word).
|
void |
FileHeader.readHeader(java.nio.ByteBuffer buffer,
int offset)
Reads the file header information from a byte buffer and validates
it by checking the magic word (8th word).
|
void |
RecordHeader.readHeader(java.nio.ByteBuffer buffer,
int offset)
Reads the header information from a byte buffer and validates
it by checking the magic word (8th word).
|
void |
RecordInputStream.readRecord(java.nio.ByteBuffer buffer,
int offset)
Reads a record from the buffer at the given offset.
|
boolean |
Reader.readRecord(int index)
Reads record from the file/buffer at the given record index.
|
void |
RecordInputStream.readRecord(java.io.RandomAccessFile file,
long position)
Reads record from the file at given position.
|
java.nio.ByteBuffer |
Reader.removeStructure(EvioNode removeNode)
This method removes the data, represented by the given node, from the buffer.
|
java.nio.ByteBuffer |
Reader.scanBuffer()
This method scans a buffer to find all records and store their position, length,
and event count.
|
void |
Reader.scanFile(boolean force)
Scans the file to index all the record positions.
|
void |
Reader.scanUncompressedBuffer()
Scan buffer to find all records and store their position, length, and event count.
|
void |
Reader.setBuffer(java.nio.ByteBuffer buf)
This method can be used to avoid creating additional Reader
objects by reusing this one with another buffer.
|
void |
Reader.setBuffer(java.nio.ByteBuffer buf,
EvioNodeSource pool)
This method can be used to avoid creating additional Reader
objects by reusing this one with another buffer.
|
static void |
TestWriter.streamRecord() |
static void |
TestWriter.testStreamRecord() |
static void |
TestWriter.testWriterVsWriterNew() |
void |
RecordOutputStream.transferDataForReading(RecordOutputStream rec)
Copy the contents of the arg into this object and get data buffer ready for reading.
|
static int |
Compressor.uncompressLZ4(byte[] src,
int srcOff,
int srcSize,
byte[] dst,
int dstOff)
LZ4 decompression.
|
static int |
Compressor.uncompressLZ4(java.nio.ByteBuffer src,
int srcSize,
java.nio.ByteBuffer dst)
LZ4 decompression.
|
static int |
Compressor.uncompressLZ4(java.nio.ByteBuffer src,
int srcOff,
int srcSize,
java.nio.ByteBuffer dst)
LZ4 decompression.
|
(package private) static int |
RecordInputStream.uncompressRecord(java.nio.ByteBuffer srcBuf,
int srcOff,
java.nio.ByteBuffer dstBuf,
boolean arrayBacked,
RecordHeader header)
Uncompress the data of a record from the source buffer at the given offset
into the destination buffer.
|
void |
FileHeader.writeHeader(java.nio.ByteBuffer buffer)
Writes the file (not record!) header into the given byte buffer starting at beginning.
|
void |
RecordHeader.writeHeader(java.nio.ByteBuffer buffer)
Writes this header into the given byte buffer starting at the beginning.
|
void |
FileHeader.writeHeader(java.nio.ByteBuffer buf,
int off)
Writes the file (not record!) header into the given byte buffer.
|
void |
RecordHeader.writeHeader(java.nio.ByteBuffer buf,
int off)
Writes this header into the given byte buffer.
|
void |
WriterMT.writeRecord(RecordOutputStream rec)
Appends the record to the file.
|
static void |
RecordHeader.writeTrailer(byte[] array,
int recordNumber,
java.nio.ByteOrder order)
Writes an empty trailer into the given byte array.
|
static void |
RecordHeader.writeTrailer(byte[] array,
int off,
int recordNumber,
java.nio.ByteOrder order,
java.util.List<java.lang.Integer> index)
Writes a trailer with an optional index array into the given byte array.
|
static void |
RecordHeader.writeTrailer(java.nio.ByteBuffer buf,
int recordNumber)
Writes an empty trailer into the given buffer.
|
static void |
RecordHeader.writeTrailer(java.nio.ByteBuffer buf,
int off,
int recordNumber,
java.util.List<java.lang.Integer> index)
Writes a trailer with an optional index array into the given buffer.
|
Constructor and Description |
---|
Reader(java.nio.ByteBuffer buffer)
Constructor for reading buffer with evio data.
|
Reader(java.nio.ByteBuffer buffer,
EvioNodeSource pool)
Constructor for reading buffer with evio data.
|
Reader(java.nio.ByteBuffer buffer,
EvioNodeSource pool,
boolean checkRecordNumSeq)
Constructor for reading buffer with evio data.
|
Reader(java.lang.String filename)
Constructor with filename.
|
Reader(java.lang.String filename,
boolean forceScan)
Constructor with filename.
|
RecordHeader(HeaderType type)
Constructor which sets the type of header this is.
|
Writer(java.nio.ByteBuffer buf)
Constructor for writing to a ByteBuffer.
|
Writer(java.nio.ByteBuffer buf,
byte[] userHeader)
Constructor for writing to a ByteBuffer with a user header.
|
Writer(java.nio.ByteBuffer buf,
int maxEventCount,
int maxBufferSize,
java.lang.String dictionary,
byte[] firstEvent)
Constructor with byte order.
|
WriterMT(java.lang.String filename)
Constructor with filename.
|
WriterMT(java.lang.String filename,
java.nio.ByteOrder order,
int maxEventCount,
int maxBufferSize,
CompressionType compressionType,
int compressionThreads,
int ringSize)
Constructor with filename and byte order.
|