JCE Provider
Loading...
Searching...
No Matches
Public Member Functions | List of all members
ByteFifo Class Reference

This class implements a FIFO of elements of type 'byte'. More...

Public Member Functions

 ByteFifo ()
 Creates a new ByteFifo object.
 
void put (byte[] data, int offset, int len)
 Puts data into the FIFO. More...
 
void expand (int len)
 Expands FIFO buffer. More...
 
void fill (byte val, int len)
 Fills a byte pattern into the FIFO (Padding) More...
 
void put (byte[] data)
 Puts data into the FIFO. More...
 
byte[] get (int len)
 Reads data from the FIFO. More...
 
int getSize ()
 Returns number of bytes stored in FIFO. More...
 

Detailed Description

This class implements a FIFO of elements of type 'byte'.

Member Function Documentation

◆ expand()

void expand ( int  len)

Expands FIFO buffer.

Parameters
lennumber of free bytes in FIFO

◆ fill()

void fill ( byte  val,
int  len 
)

Fills a byte pattern into the FIFO (Padding)

Parameters
valvalue to be written into the FIFO
lennumber of byte to be written into the FIFO

◆ get()

byte[] get ( int  len)

Reads data from the FIFO.

Parameters
lenNumber of bytes to be read from the FIFO
Returns
Data read from the FIFO

◆ getSize()

int getSize ( )

Returns number of bytes stored in FIFO.

Returns
Number of byte stored in FIFO

◆ put() [1/2]

void put ( byte[]  data)

Puts data into the FIFO.

Parameters
dataData to be written into the FIFO

◆ put() [2/2]

void put ( byte[]  data,
int  offset,
int  len 
)

Puts data into the FIFO.

Parameters
dataBuffer from which data is written into the FIFO
offsetoffset in 'data' array
lenlen of data to be written into the FIFO