Class ModemEncoderImpl

  • All Implemented Interfaces:
    Flushable, Encoder, ModemEncoder, ModulatorStatusAccessor, org.refcodes.component.Closable, org.refcodes.component.Closable.CloseAutomaton, org.refcodes.component.ClosedAccessor, org.refcodes.component.ConnectableComponent, org.refcodes.component.ConnectableComponent.ConnectableAutomaton, org.refcodes.component.ConnectionStatusAccessor, org.refcodes.component.Flushable, org.refcodes.component.OpenedAccessor, org.refcodes.io.ByteSource, org.refcodes.io.BytesSource, org.refcodes.io.BytesTransmitter, org.refcodes.io.ByteTransmitter, org.refcodes.io.Transmittable, org.refcodes.mixin.OutputStreamAccessor

    public class ModemEncoderImpl
    extends org.refcodes.component.AbstractConnectableAutomaton
    implements ModemEncoder
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.refcodes.io.BytesTransmitter

        org.refcodes.io.BytesTransmitter.TransmitterOutputStream
      • Nested classes/interfaces inherited from interface org.refcodes.component.Closable

        org.refcodes.component.Closable.CloseAutomaton, org.refcodes.component.Closable.CloseBuilder<B extends org.refcodes.component.Closable.CloseBuilder<B>>
      • Nested classes/interfaces inherited from interface org.refcodes.component.ClosedAccessor

        org.refcodes.component.ClosedAccessor.ClosedMutator, org.refcodes.component.ClosedAccessor.ClosedProperty
      • Nested classes/interfaces inherited from interface org.refcodes.component.ConnectableComponent

        org.refcodes.component.ConnectableComponent.ConnectableAutomaton
      • Nested classes/interfaces inherited from interface org.refcodes.component.ConnectionStatusAccessor

        org.refcodes.component.ConnectionStatusAccessor.ConnectionStatusMutator, org.refcodes.component.ConnectionStatusAccessor.ConnectionStatusProperty
      • Nested classes/interfaces inherited from interface org.refcodes.component.Flushable

        org.refcodes.component.Flushable.FlushBuilder<B extends org.refcodes.component.Flushable.FlushBuilder<B>>
      • Nested classes/interfaces inherited from interface org.refcodes.component.OpenedAccessor

        org.refcodes.component.OpenedAccessor.OpenedMutator, org.refcodes.component.OpenedAccessor.OpenedProperty
      • Nested classes/interfaces inherited from interface org.refcodes.mixin.OutputStreamAccessor

        org.refcodes.mixin.OutputStreamAccessor.OutputStreamBuilder<B extends org.refcodes.mixin.OutputStreamAccessor.OutputStreamBuilder<?>>, org.refcodes.mixin.OutputStreamAccessor.OutputStreamMutator, org.refcodes.mixin.OutputStreamAccessor.OutputStreamProperty
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      void flush()
      ModulatorStatus getModulatorStatus()
      Retrieves the Modulator-Status from the Modulator-Status property.
      void open()
      protected void open​(org.refcodes.io.BytesSource aConnection)  
      protected void open​(org.refcodes.io.ShortsSource aConnection)  
      protected void purge()  
      void transmitBytes​(byte[] aBytes, int aOffset, int aLength)
      • Methods inherited from class org.refcodes.component.AbstractConnectableAutomaton

        getConnectionStatus, isClosable, isClosed, isOpenable, isOpened, setConnectionStatus
      • Methods inherited from interface org.refcodes.io.BytesSource

        transmitAllBytes, transmitByte
      • Methods inherited from interface org.refcodes.io.BytesTransmitter

        getOutputStream
      • Methods inherited from interface org.refcodes.component.Closable

        closeIn, closeQuietly, closeUnchecked
      • Methods inherited from interface org.refcodes.component.Closable.CloseAutomaton

        isClosable
      • Methods inherited from interface org.refcodes.component.ClosedAccessor

        isClosed
      • Methods inherited from interface org.refcodes.component.ConnectionStatusAccessor

        getConnectionStatus, isOpened
      • Methods inherited from interface org.refcodes.component.Flushable

        flushUnchecked, isFlushable
    • Constructor Detail

      • ModemEncoderImpl

        public ModemEncoderImpl​(ModemMetrics aModemMetrics,
                                org.refcodes.io.BytesSource aByteConsumer)
        Instantiates a new modem encoder impl.
        Parameters:
        aModemMetrics - the modem metrics
        aByteConsumer - the byte consumer
      • ModemEncoderImpl

        public ModemEncoderImpl​(ModemMetrics aModemMetrics,
                                org.refcodes.io.ShortsSource aShortConsumer)
        Instantiates a new modem encoder impl.
        Parameters:
        aModemMetrics - the modem metrics
        aShortConsumer - the short consumer
      • ModemEncoderImpl

        public ModemEncoderImpl​(ModemMetrics aModemMetrics,
                                org.refcodes.io.BytesTransmitter aByteSender)
                         throws IOException
        Instantiates a new modem encoder impl.
        Parameters:
        aModemMetrics - the modem metrics
        aByteSender - the byte sender
        Throws:
        IOException - Signals that an I/O exception has occurred.
      • ModemEncoderImpl

        public ModemEncoderImpl​(ModemMetrics aModemMetrics,
                                org.refcodes.io.ShortsTransmitter aShortSender)
                         throws IOException
        Instantiates a new modem encoder impl.
        Parameters:
        aModemMetrics - the modem metrics
        aShortSender - the short sender
        Throws:
        IOException - Signals that an I/O exception has occurred.
      • ModemEncoderImpl

        protected ModemEncoderImpl​(ModemMetrics aModemMetrics)
    • Method Detail

      • transmitBytes

        public void transmitBytes​(byte[] aBytes,
                                  int aOffset,
                                  int aLength)
                           throws IOException
        Specified by:
        transmitBytes in interface org.refcodes.io.BytesSource
        Specified by:
        transmitBytes in interface org.refcodes.io.BytesTransmitter
        Throws:
        IOException
      • flush

        public void flush()
                   throws IOException
        Specified by:
        flush in interface org.refcodes.io.ByteTransmitter
        Specified by:
        flush in interface Flushable
        Specified by:
        flush in interface org.refcodes.component.Flushable
        Throws:
        IOException
      • open

        public void open()
                  throws IOException
        Overrides:
        open in class org.refcodes.component.AbstractConnectableAutomaton
        Throws:
        IOException
      • 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​(org.refcodes.io.ShortsSource aConnection)
                     throws IOException
        Throws:
        IOException
      • open

        protected void open​(org.refcodes.io.BytesSource aConnection)
                     throws IOException
        Throws:
        IOException
      • purge

        protected void purge()