Class LengthPrefixedBinaryTCPClientImpl

  • All Implemented Interfaces:
    TCPClient

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

      • LengthPrefixedBinaryTCPClientImpl

        public LengthPrefixedBinaryTCPClientImpl()
    • Method Detail

      • 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