Package org.deepjava.runtime.util
Class ByteLiFo
- java.lang.Object
- 
- org.deepjava.runtime.util.ByteLiFo
 
- 
 public class ByteLiFo extends Object Non thread-save last in first outbytequeue.
- 
- 
Constructor SummaryConstructors Constructor Description ByteLiFo(int size)Creates a newByteLifowithsizeentries.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description intavailToRead()Reads the available entries in the queue.voidclear()Clears the LiFo.booleancompare(byte[] cData, int lifoOffset, int length)Compares the LiFo with abyte array.bytepop()Removes onebytefrom the LiFo.voidpush(byte d)Inserts onebyteinto the LiFo.
 
- 
- 
- 
Method Detail- 
pushpublic void push(byte d) Inserts onebyteinto the LiFo.- Parameters:
- d-- Bytewhich will be inserted into the LiFo
 
 - 
poppublic byte pop() Removes onebytefrom the LiFo.- Returns:
- The removed byte
 
 - 
clearpublic void clear() Clears the LiFo.
 - 
availToReadpublic int availToRead() Reads the available entries in the queue.- Returns:
- The available bytesto read.
 
 - 
comparepublic boolean compare(byte[] cData, int lifoOffset, int length)Compares the LiFo with abyte array.- Parameters:
- cData- The byte array to compare with the LiFo
- lifoOffset- The start offset of the LiFo
- length- The length of- cData
- Returns:
- true if cDataand the LiFo are equal, false otherwise
 
 
- 
 
-