public class BinaryTCPClientImpl extends AbstractTCPClient
Input/Output strings are passed as hex-encoded binary strings.
eolByte, useEolByte
Constructor and Description |
---|
BinaryTCPClientImpl() |
Modifier and Type | Method and Description |
---|---|
static byte[] |
hexStringToByteArray(String hexEncodedBinary)
Convert hex string to binary byte array.
|
String |
read(InputStream is)
Deprecated.
|
String |
read(InputStream is,
SampleResult sampleResult)
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.
|
getCharset, getEolByte, setCharset, setEolByte, setupTest, teardownTest
public static byte[] hexStringToByteArray(String hexEncodedBinary)
hexEncodedBinary
- - hex-encoded binary stringIllegalArgumentException
- if string is not an even number of hex digitspublic void write(OutputStream os, String hexEncodedBinary) throws IOException
os
- output streamhexEncodedBinary
- hex-encoded binaryIOException
- when writing failspublic void write(OutputStream os, InputStream is)
os
- -
OutputStream for socketis
- -
InputStream to be written to Socket@Deprecated public String read(InputStream is) throws ReadException
is
- -
InputStream for socketReadException
- exception that can contain partial response (Response until error occurred)public String read(InputStream is, SampleResult sampleResult) throws ReadException
read
in interface TCPClient
read
in class AbstractTCPClient
is
- -
InputStream for socketsampleResult
- SampleResult
ReadException
- when reading failsTCPClient.read(java.io.InputStream, org.apache.jmeter.samplers.SampleResult)
Copyright © 1998-2019 Apache Software Foundation. All Rights Reserved.