public class

BinaryFrames

extends Object
implements IBinaryFrames
java.lang.Object
   ↳ com.pnfsoftware.jeb.core.units.impl.BinaryFrames

Class Overview

Do not use.

Summary

Public Constructors
BinaryFrames()
Create an empty binary frames.
BinaryFrames(byte[] data)
Create a binary frames object and add a first array of bytes to it.
Public Methods
BinaryFrames add(byte[] data)
Add a frame to the object.
int count()
Determine the number of frames in this object.
static BinaryFrames fromBytes(byte[] serializedData)
Deserialize a stream of bytes into a binary frames object.
byte[] get(int index)
Read the frame at the given position.
byte[] pull(int index)
Extract the frame at the given position.
byte[] pullCurrent()
Extract the frame at offset 0.
byte[] toBytes()
Serialize the object to a byte array representing the list of frames.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.pnfsoftware.jeb.core.units.IBinaryFrames

Public Constructors

public BinaryFrames ()

Create an empty binary frames.

public BinaryFrames (byte[] data)

Create a binary frames object and add a first array of bytes to it.

Parameters
data frame

Public Methods

public BinaryFrames add (byte[] data)

Add a frame to the object.

Parameters
data the data frame to add
Returns
  • this frame

public int count ()

Determine the number of frames in this object.

Returns
  • the number of frames

public static BinaryFrames fromBytes (byte[] serializedData)

Deserialize a stream of bytes into a binary frames object.

Parameters
serializedData data
Returns
  • the binary frames object, null on error

public 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 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 byte[] pullCurrent ()

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

Returns
  • the frame data

public byte[] toBytes ()

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

Returns
  • bytes of the serialized frames