org.lastbamboo.common.tcp.frame
Class TcpFrame

java.lang.Object
  extended by org.lastbamboo.common.tcp.frame.TcpFrame

public final class TcpFrame
extends Object

Class for a single TCP frame.


Constructor Summary
TcpFrame(byte[] data)
          Creates a new TcpFrame.
TcpFrame(byte[] data, int off, int len)
           
TcpFrame(org.littleshoot.mina.common.ByteBuffer data)
          Creates a new TCP frame for the specified framed data.
 
Method Summary
 byte[] getData()
          Accessor for the framed data buffer.
 int getLength()
          Accessor for the length of the framed data.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TcpFrame

public TcpFrame(org.littleshoot.mina.common.ByteBuffer data)
Creates a new TCP frame for the specified framed data.

Parameters:
data - The data to frame.

TcpFrame

public TcpFrame(byte[] data)
Creates a new TcpFrame.

Parameters:
data - The data.

TcpFrame

public TcpFrame(byte[] data,
                int off,
                int len)
Method Detail

getLength

public int getLength()
Accessor for the length of the framed data.

Returns:
The length of the framed data.

getData

public byte[] getData()
Accessor for the framed data buffer.

Returns:
The framed data buffer.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013 LittleShoot. All Rights Reserved.