Class BinaryTCPClientImpl
java.lang.Object
org.apache.jmeter.protocol.tcp.sampler.AbstractTCPClient
org.apache.jmeter.protocol.tcp.sampler.BinaryTCPClientImpl
- All Implemented Interfaces:
- TCPClient
TCPClient implementation.
 Reads data until the defined EOM byte is reached.
 If there is no EOM byte defined, then reads until
 the end of the stream is reached.
 The EOM byte is defined by the property "tcp.BinaryTCPClient.eomByte".
 
Input/Output strings are passed as hex-encoded binary strings.
- 
Field SummaryFields inherited from class org.apache.jmeter.protocol.tcp.sampler.AbstractTCPClienteolByte, useEolByte
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic byte[]hexStringToByteArray(String hexEncodedBinary) Convert hex string to binary byte array.read(InputStream is) Deprecated.read(InputStream is, SampleResult sampleResult) Reads data until the defined EOM byte is reached.voidwrite(OutputStream os, InputStream is) voidwrite(OutputStream os, String hexEncodedBinary) Input (hex) string is converted to binary and written to the output stream.Methods inherited from class org.apache.jmeter.protocol.tcp.sampler.AbstractTCPClientgetCharset, getEolByte, setCharset, setEolByte, setupTest, teardownTest
- 
Constructor Details- 
BinaryTCPClientImplpublic BinaryTCPClientImpl()
 
- 
- 
Method Details- 
hexStringToByteArrayConvert hex string to binary byte array.- Parameters:
- hexEncodedBinary- - hex-encoded binary string
- Returns:
- Byte array containing binary representation of input hex-encoded string
- Throws:
- IllegalArgumentException- if string is not an even number of hex digits
 
- 
writeInput (hex) string is converted to binary and written to the output stream.- Parameters:
- os- output stream
- hexEncodedBinary- hex-encoded binary
- Throws:
- IOException- when writing fails
 
- 
write- Parameters:
- os- - OutputStream for socket
- is- - InputStream to be written to Socket
 
- 
readDeprecated.- Parameters:
- is- - InputStream for socket
- Returns:
- String read from socket
- Throws:
- ReadException- exception that can contain partial response (Response until error occurred)
 
- 
readReads data until the defined EOM byte is reached. If there is no EOM byte defined, then reads until the end of the stream is reached. Response data is converted to hex-encoded binary- Specified by:
- readin interface- TCPClient
- Overrides:
- readin class- AbstractTCPClient
- Parameters:
- is- - InputStream for socket
- sampleResult-- SampleResult
- Returns:
- hex-encoded binary string
- Throws:
- ReadException- when reading fails
- See Also:
 
 
-