public class Codec extends Object
| Constructor and Description |
|---|
Codec() |
| Modifier and Type | Method and Description |
|---|---|
static Packet |
decodeEthernet(byte[] fb)
Decodes an Ethernet packet.
|
static Packet |
decodeEthernet(byte[] fb,
int height)
Decodes an Ethernet packet.
|
static byte[] |
encode(Packet pkt)
Encode a packet.
|
static byte[] |
encode(Packet pkt,
int minLen)
Encode a packet specifying the minimum encode length.
|
public static byte[] encode(Packet pkt)
pkt - packet to encodepublic static byte[] encode(Packet pkt, int minLen)
pkt - packet to encodeminLen - minimum packet encode lengthpublic static Packet decodeEthernet(byte[] fb)
fb - encoded frame bytesProtocolException - if there is an error parsing from readerpublic static Packet decodeEthernet(byte[] fb, int height)
fb - encoded frame bytesheight - number of layers to decode before stoppingProtocolException - if there is an error parsing from readerCopyright © 2014. All Rights Reserved.