|
HOME | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ireasoning.core.network.TransportData
This class is a data structure representing a byte array and its valid length
Field Summary | |
protected byte[] |
_data
Data of this object |
protected int |
_length
Valid length of this object's data |
static int |
DEFAULT_BUF_SIZE
Default buffer size is 16kb |
Constructor Summary | |
TransportData()
Default constructor. |
|
TransportData(byte[] data)
Constructor. |
|
TransportData(byte[] data,
int len)
Constructor. |
|
TransportData(int bufSize)
Constructor. |
|
TransportData(String s)
Constructor. |
Method Summary | |
byte[] |
getData()
Returns the data buffer |
InetAddress |
getIpAddress()
|
int |
getLength()
Returns the valid length of internal data buffer |
void |
setData(byte[] data)
Sets a new byte array |
void |
setIpAddress(InetAddress ipAddress)
|
void |
setLength(int len)
Sets the valid length of interal data buffer |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected byte[] _data
protected int _length
public static final int DEFAULT_BUF_SIZE
Constructor Detail |
public TransportData()
public TransportData(int bufSize)
bufSize
- the buffer size of internal byte array object.public TransportData(byte[] data, int len)
len
- the buffer size of passed data object.data
- the data bufferpublic TransportData(byte[] data)
data
- the data bufferpublic TransportData(String s)
s
- a String object to be copiedMethod Detail |
public void setLength(int len)
public int getLength()
public void setData(byte[] data)
public byte[] getData()
public InetAddress getIpAddress()
public void setIpAddress(InetAddress ipAddress)
|
HOME | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |