public class LengthPrefixedBinaryTCPClientImpl extends TCPClientDecorator
This is used in ISO8583 for example. Input/Output strings are passed as hex-encoded binary strings.
2-Byte or 4-Byte length prefixes are supported.
Length prefix is binary of length specified by property "tcp.length.prefix.length".
tcpClient
eolByte, useEolByte
Constructor and Description |
---|
LengthPrefixedBinaryTCPClientImpl() |
Modifier and Type | Method and Description |
---|---|
byte |
getEolByte()
Not useful, as the byte is never used.
|
String |
read(InputStream is)
Deprecated.
|
String |
read(InputStream is,
SampleResult sampleResult)
Default implementation calls
TCPClient.read(InputStream) for backward compatibility |
void |
setEolByte(int eolInt)
Set the end-of-line/end-of-message byte.
|
void |
write(OutputStream os,
InputStream is) |
void |
write(OutputStream os,
String s) |
byteArrayToInt, intToByteArray
getCharset, setCharset, setupTest, teardownTest
public void write(OutputStream os, String s) throws IOException
os
- -
OutputStream for sockets
- -
String to writeIOException
- when writing failspublic void write(OutputStream os, InputStream is) throws IOException
os
- -
OutputStream for socketis
- -
InputStream to be written to SocketIOException
- when writing fails@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
TCPClient.read(InputStream)
for backward compatibilityread
in interface TCPClient
read
in class AbstractTCPClient
is
- -
InputStream for socketsampleResult
- SampleResult
ReadException
- exception that can contain partial responseTCPClient.read(java.io.InputStream, org.apache.jmeter.samplers.SampleResult)
public byte getEolByte()
Get the end-of-line/end-of-message byte.
getEolByte
in interface TCPClient
getEolByte
in class AbstractTCPClient
public void setEolByte(int eolInt)
setEolByte
in interface TCPClient
setEolByte
in class AbstractTCPClient
eolInt
- The value to setCopyright © 1998-2019 Apache Software Foundation. All Rights Reserved.