public class DelimitedBuffer
extends java.lang.Object
| Constructor and Description |
|---|
DelimitedBuffer(int size,
int offhead,
byte[] sot,
int offtail,
byte[] eot) |
DelimitedBuffer(int size,
int offhead,
java.lang.String sot,
int offtail,
java.lang.String eot) |
| Modifier and Type | Method and Description |
|---|---|
int |
getBoundary() |
byte[] |
getBuffer() |
byte[] |
getEotBytes() |
int |
getLeftover() |
int |
getOffhead() |
int |
getOfftail() |
byte[] |
getSotBytes() |
void |
reset() |
int |
scan(int offset,
int length)
It scans the byte array of the internal buffer for either EOT or
SOT strings starting from offset up to its end defined by length.
|
void |
setLeftover(int i) |
public static final int MS_SOT
public static final int MS_EOT
public DelimitedBuffer(int size,
int offhead,
java.lang.String sot,
int offtail,
java.lang.String eot)
size - the buffer sizeoffhead - number of bytes to trim off the delimiter at the beginningsot - a hexString of the delimiter at the beginningofftail - number of bytes to trim off the delimiter at the endeot - a hexString of the delimiter at the endpublic DelimitedBuffer(int size,
int offhead,
byte[] sot,
int offtail,
byte[] eot)
public int scan(int offset,
int length)
public byte[] getBuffer()
public byte[] getSotBytes()
public byte[] getEotBytes()
public int getOfftail()
public int getOffhead()
public int getBoundary()
public int getLeftover()
public void setLeftover(int i)
public void reset()