# Class LengthPrefixedBinaryTCPClientImpl

java.lang.Object
org.apache.jmeter.protocol.tcp.sampler.AbstractTCPClient
org.apache.jmeter.protocol.tcp.sampler.TCPClientDecorator
org.apache.jmeter.protocol.tcp.sampler.LengthPrefixedBinaryTCPClientImpl

All Implemented Interfaces:
  `TCPClient`

public class LengthPrefixedBinaryTCPClientImpl extends TCPClientDecorator
Implements binary length-prefixed binary data. This is used in ISO8583 for example.

## Field Summary

### Fields inherited from class TCPClientDecorator

`tcpClient`

### Fields inherited from class AbstractTCPClient

`eolByte, useEolByte`

## Constructor Summary

Constructors
Constructor
Description
`LengthPrefixedBinaryTCPClientImpl()`

## Method Summary

Modifier and Type
Method
Description
`byte`
`getEolByte()`
Not useful, as the byte is never used.
`String`
`read(InputStream is)`
`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)`

### Methods inherited from class TCPClientDecorator

`byteArrayToInt, intToByteArray`

### Methods inherited from class AbstractTCPClient

`getCharset, setCharset, setupTest, teardownTest`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### LengthPrefixedBinaryTCPClientImpl

public LengthPrefixedBinaryTCPClientImpl()

## Method Details

### write

public void write(OutputStream os, String s) throws IOException

Parameters:
  `os` - - OutputStream for socket
  `s` - - String to write
Throws:
  `IOException` - when writing fails

### write

public void write(OutputStream os, InputStream is) throws IOException

Parameters:
  `os` - - OutputStream for socket
  `is` - - InputStream to be written to Socket
Throws:
  `IOException` - when writing fails

### read

public String read(InputStream is) throws ReadException

Parameters:
  `is` - - InputStream for socket
Returns:
  String read from socket
Throws:
  `ReadException` - exception that can contain partial response (Response until error occured)

### getEolByte

public byte getEolByte()
Not useful, as the byte is never used.

Get the end-of-line/end-of-message byte.

Specified by:
  `getEolByte` in interface `TCPClient`
Overrides:
  `getEolByte` in class `AbstractTCPClient`
Returns:
  Returns the eolByte.

### setEolByte

public void setEolByte(int eolInt)
Set the end-of-line/end-of-message byte. If the value is out of range of a byte, then it is to be ignored.

Specified by:
  `setEolByte` in interface `TCPClient`
Overrides:
  `setEolByte` in class `AbstractTCPClient`
Parameters:
  `eolInt` - The value to set