Class TCPClientDecorator
java.lang.Object
org.apache.jmeter.protocol.tcp.sampler.AbstractTCPClient
org.apache.jmeter.protocol.tcp.sampler.TCPClientDecorator
- All Implemented Interfaces:
- TCPClient
- Direct Known Subclasses:
- LengthPrefixedBinaryTCPClientImpl
TCP Sampler Client decorator to permit wrapping base client implementations with length prefixes.
 
For example, character data or binary data with character length or binary length.
- 
Field SummaryFieldsFields inherited from class org.apache.jmeter.protocol.tcp.sampler.AbstractTCPClienteolByte, useEolByte
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic intbyteArrayToInt(byte[] b) Convert byte array to int.static byte[]intToByteArray(int value, int len) Convert int to byte array.Methods inherited from class org.apache.jmeter.protocol.tcp.sampler.AbstractTCPClientgetCharset, getEolByte, read, setCharset, setEolByte, setupTest, teardownTest
- 
Field Details- 
tcpClient
 
- 
- 
Constructor Details- 
TCPClientDecorator
 
- 
- 
Method Details- 
intToByteArraypublic static byte[] intToByteArray(int value, int len) Convert int to byte array.- Parameters:
- value- - int to be converted
- len- - length of required byte array
- Returns:
- Byte array representation of input value
- Throws:
- IllegalArgumentException- if not length 2 or 4 or outside range of a short int.
 
- 
byteArrayToIntpublic static int byteArrayToInt(byte[] b) Convert byte array to int.- Parameters:
- b- - Byte array to be converted
- Returns:
- Integer value of input byte array
- Throws:
- IllegalArgumentException- if ba is null or not length 2 or 4
 
 
-