Class
Tree
          
SUMMARY: INNER | FIELD | CONSTR | METHODDETAIL: FIELD | CONSTR | METHOD
 

com.newstep.solid.netio.slip.codec
Class SignedIntCodec
All Implemented Interfaces:
       SlipMessageHeaderCodec

public class SignedIntCodec      
Encodes and decodes SLIP message headers containing the payload length. This
encoder does not need to translate/modify the length value as its native form
is a signed integer
Implements:
SlipMessageHeaderCodec
 
Links:
Implementation Implementation Link
to Interface SlipMessageHeaderCodec
Encodes and decodes SLIP message headers containing the payload length. This
encoder does not need to translate/modify the length value as its native form
is a signed integer
 
 

Method Summary
public int
decode(ByteBuffer buffer)
public void
encode(ByteBuffer buffer, Integer length)
Method Detail
decode
public int decode (ByteBuffer buffer)
 
Decodes the length value from the specified buffer
Parameters:
buffer The ByteBuffer from which to decode the payload length
value
 

encode
public void encode (ByteBuffer buffer, Integer length)
 
Encodes the payload length writing it to the specified byte buffer
Parameters:
buffer The ByteBuffer into which the length header should be
encoded
length The signed integer value representing the size of the SLIP
message's associated payload (in bytes).
 

Class
Tree
          
SUMMARY: INNER | FIELD | CONSTR | METHODDETAIL: FIELD | CONSTR | METHOD