com.act365.net.tcp
Class TCPReader
java.lang.Object
|
+--com.act365.net.tcp.TCPReader
- public class TCPReader
- extends java.lang.Object
Reads TCP messages.
|
Method Summary |
static TCPMessage |
read(byte[] buffer,
int offset,
int count)
Reads a TCP message from a buffer without a checksum test. |
static TCPMessage |
read(byte[] buffer,
int offset,
int count,
boolean testchecksum,
byte[] source,
byte[] destination)
Reads a TCP message from a buffer and performs a checksum test |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TCPReader
public TCPReader()
read
public static TCPMessage read(byte[] buffer,
int offset,
int count)
throws java.io.IOException
- Reads a TCP message from a buffer without a checksum test.
read
public static TCPMessage read(byte[] buffer,
int offset,
int count,
boolean testchecksum,
byte[] source,
byte[] destination)
throws java.io.IOException
- Reads a TCP message from a buffer and performs a checksum test
- Parameters:
buffer - buffer to be read fromoffset - position within buffer to read fromcount - number of bytes to readtestchecksum - whether to test the checksum in the messagesource - message source (used in checksum test)destination - message destination (used in checksum test)- Returns:
- the decoded message
- Throws:
java.io.IOException - checksum error