public interface

IBinaryFrames

com.pnfsoftware.jeb.core.units.IBinaryFrames

Class Overview

Binary frames are used to serialize list of byte arrays into a single byte array.

Summary

Public Methods
abstract IBinaryFrames add(byte[] data)
Add a frame to the object.
abstract int count()
Determine the number of frames in this object.
abstract byte[] get(int index)
Read the frame at the given position.
abstract byte[] pull(int index)
Extract the frame at the given position.
abstract byte[] pullCurrent()
Extract the frame at offset 0.
abstract byte[] toBytes()
Serialize the object to a byte array representing the list of frames.

Public Methods

public abstract IBinaryFrames add (byte[] data)

Add a frame to the object.

Parameters
data the data frame to add
Returns
  • this frame

public abstract int count ()

Determine the number of frames in this object.

Returns
  • the number of frames

public abstract byte[] get (int index)

Read the frame at the given position. Throws if index is out of range.

Parameters
index frame index
Returns
  • the frame data

public abstract byte[] pull (int index)

Extract the frame at the given position. Calling method effectively decrements the number of frames contained in this object. Throws if index is out of range.

Parameters
index frame index
Returns
  • the frame data

public abstract byte[] pullCurrent ()

Extract the frame at offset 0. Throws if index is out of range.

Returns
  • the frame data

public abstract byte[] toBytes ()

Serialize the object to a byte array representing the list of frames.

Returns
  • bytes of the serialized frames