public abstract class TCPClientDecorator extends AbstractTCPClient
For example, character data or binary data with character length or binary length.
| Modifier and Type | Field and Description |
|---|---|
protected TCPClient |
tcpClient |
eolByte, useEolByte| Modifier | Constructor and Description |
|---|---|
protected |
TCPClientDecorator(TCPClient tcpClient) |
| Modifier and Type | Method and 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, read, setCharset, setEolByte, setupTest, teardownTestprotected final TCPClient tcpClient
protected 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-2020 Apache Software Foundation. All Rights Reserved.