|
jPOS 1.6.7 API Documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jpos.iso.BinaryPrefixer
public class BinaryPrefixer
BinaryPrefixer constructs a prefix storing the length in binary.
| Field Summary | |
|---|---|
static BinaryPrefixer |
B
A length prefixer for upto 255 chars. |
static BinaryPrefixer |
BB
A length prefixer for upto 65535 chars. |
| Constructor Summary | |
|---|---|
BinaryPrefixer(int nBytes)
|
|
| Method Summary | |
|---|---|
int |
decodeLength(byte[] b,
int offset)
Decodes an encoded length. |
void |
encodeLength(int length,
byte[] b)
Fills a byte array with the field length data in raw form. |
int |
getPackedLength()
Returns the number of bytes taken up by the length encoding. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final BinaryPrefixer B
public static final BinaryPrefixer BB
| Constructor Detail |
|---|
public BinaryPrefixer(int nBytes)
| Method Detail |
|---|
public void encodeLength(int length,
byte[] b)
Prefixer
encodeLength in interface Prefixerlength - The length to be encoded.b - The byte array to fill with the encoded length.
public int decodeLength(byte[] b,
int offset)
Prefixer
decodeLength in interface Prefixerb - The byte array to scan for the length.offset - The offset to start scanning from.
public int getPackedLength()
Prefixer
getPackedLength in interface Prefixer
|
jPOS.org | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||