Class AbstractInputStreamByteReceiver

    • Constructor Detail

      • AbstractInputStreamByteReceiver

        public AbstractInputStreamByteReceiver()
    • Method Detail

      • receiveByte

        public byte receiveByte()
                         throws IOException
        Reads (receives) the next byte, in case none byte is available, then this method blocks until one is available.
        Specified by:
        receiveByte in interface ByteDestination
        Specified by:
        receiveByte in interface BytesDestination
        Returns:
        The next byte available .
        Throws:
        IOException - Thrown in case opening or accessing an open line (connection, junction, link) caused problems.
        EOFException - Signals that an end of file or end of stream has been reached unexpectedly during input.
      • close

        public void close()
                   throws IOException
        Specified by:
        close in interface org.refcodes.component.Closable
        Overrides:
        close in class org.refcodes.component.AbstractConnectableAutomaton
        Throws:
        IOException
      • open

        protected void open​(InputStream aInputStream)
                     throws IOException
        Open, see ConnectionOpenable.open(Object).
        Parameters:
        aInputStream - the input stream
        Throws:
        IOException - the open exception
      • isOpenable

        protected boolean isOpenable​(InputStream aInputStream)
        Checks if is openable. See also ConnectionOpenable.ConnectionOpenAutomaton.isOpenable(Object).
        Parameters:
        aInputStream - the input stream
        Returns:
        true, if is openable