TCPClient
LengthPrefixedBinaryTCPClientImpl
public abstract class TCPClientDecorator extends AbstractTCPClient
Modifier and Type | Field | Description |
---|---|---|
protected TCPClient |
tcpClient |
eolByte, useEolByte
Constructor | Description |
---|---|
TCPClientDecorator(TCPClient tcpClient) |
Modifier and Type | Method | Description |
---|---|---|
static int |
byteArrayToInt(byte[] b) |
Convert byte array to int.
|
static byte[] |
intToByteArray(int value,
int len) |
Convert int to byte array.
|
getCharset, getEolByte, setCharset, setEolByte, setupTest, teardownTest
protected final TCPClient tcpClient
public TCPClientDecorator(TCPClient tcpClient)
public static byte[] intToByteArray(int value, int len)
value
- - int to be convertedlen
- - length of required byte arrayIllegalArgumentException
- if not length 2 or 4 or outside range of a short int.public static int byteArrayToInt(byte[] b)
b
- - Byte array to be convertedIllegalArgumentException
- if ba is null or not length 2 or 4Copyright © 1998-2018 Apache Software Foundation. All Rights Reserved.