| java.lang.Object org.bouncycastle.crypto.tls.ByteQueue
ByteQueue | public class ByteQueue (Code) | | A queue for bytes.
This file could be more optimized.
|
Method Summary | |
public void | addData(byte[] data, int offset, int len) Add some data to our buffer. | final public static int | nextTwoPow(int i) | public void | read(byte[] buf, int offset, int len, int skip) Read data from the buffer. | public void | removeData(int i) Remove some bytes from our data from the beginning. | public int | size() |
addData | public void addData(byte[] data, int offset, int len)(Code) | | Add some data to our buffer.
Parameters: data - A byte-array to read data from. Parameters: offset - How many bytes to skip at the beginning of the array. Parameters: len - How many bytes to read from the array. |
nextTwoPow | final public static int nextTwoPow(int i)(Code) | | The smallest number which can be written as 2^x which isbigger than i. |
read | public void read(byte[] buf, int offset, int len, int skip)(Code) | | Read data from the buffer.
Parameters: buf - The buffer where the read data will be copied to. Parameters: offset - How many bytes to skip at the beginning of buf. Parameters: len - How many bytes to read at all. Parameters: skip - How many bytes from our data to skip. |
removeData | public void removeData(int i)(Code) | | Remove some bytes from our data from the beginning.
Parameters: i - How many bytes to remove. |
size | public int size()(Code) | | The number of bytes which are available in this buffer. |
|
|