org.apache.jmeter.protocol.tcp.sampler
Class BinaryTCPClientImpl
- TCPClient
public class BinaryTCPClientImpl
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 data is assumed to be in hex, and is converted to binary
static byte[] | hexStringToByteArray(String hexEncodedBinary) - Convert hex string to binary byte array.
|
String | read(InputStream is) - Reads data until the defined EOM byte is reached.
|
void | write(OutputStream os, InputStream is)
|
void | write(OutputStream os, String hexEncodedBinary) - Input (hex) string is converted to binary and written to the output stream.
|
BinaryTCPClientImpl
public BinaryTCPClientImpl()
hexStringToByteArray
public static final byte[] hexStringToByteArray(String hexEncodedBinary)
Convert hex string to binary byte array.
hexEncodedBinary
- - hex-encoded binary string
- Byte array containing binary representation of input hex-encoded string
read
public String read(InputStream is)
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.
Response data is converted to hex-encoded binary
- read in interface TCPClient
- hex-encoded binary string
write
public void write(OutputStream os,
InputStream is)
- write in interface TCPClient
write
public void write(OutputStream os,
String hexEncodedBinary)
Input (hex) string is converted to binary and written to the output stream.
- write in interface TCPClient
os
- output streamhexEncodedBinary
- hex-encoded binary
Copyright © 1998-2010 Apache Software Foundation. All Rights Reserved.