Class ModemEncoderImpl

java.lang.Object
org.refcodes.component.AbstractConnectableAutomaton
org.refcodes.codec.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.codec.ModemEncoder

    ModemEncoder.ModemEncoderConsumer

    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
  • Field Summary

    Fields
    Modifier and Type Field Description
    ModulatorStatus _modulatorStatus  
  • Constructor Summary

    Constructors
    Modifier Constructor Description
    protected ModemEncoderImpl​(ModemMetrics aModemMetrics)  
      ModemEncoderImpl​(ModemMetrics aModemMetrics, org.refcodes.io.BytesSource aByteConsumer)  
      ModemEncoderImpl​(ModemMetrics aModemMetrics, org.refcodes.io.BytesTransmitter aByteSender)  
      ModemEncoderImpl​(ModemMetrics aModemMetrics, org.refcodes.io.ShortsSource aShortConsumer)  
      ModemEncoderImpl​(ModemMetrics aModemMetrics, org.refcodes.io.ShortsTransmitter aShortSender)  
  • Method Summary

    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 class java.lang.Object

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

    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
  • Field Details

  • Constructor Details

    • ModemEncoderImpl

      public ModemEncoderImpl​(ModemMetrics aModemMetrics, org.refcodes.io.BytesSource aByteConsumer)
    • ModemEncoderImpl

      public ModemEncoderImpl​(ModemMetrics aModemMetrics, org.refcodes.io.ShortsSource aShortConsumer)
    • ModemEncoderImpl

      public ModemEncoderImpl​(ModemMetrics aModemMetrics, org.refcodes.io.BytesTransmitter aByteSender) throws IOException
      Throws:
      IOException
    • ModemEncoderImpl

      public ModemEncoderImpl​(ModemMetrics aModemMetrics, org.refcodes.io.ShortsTransmitter aShortSender) throws IOException
      Throws:
      IOException
    • ModemEncoderImpl

      protected ModemEncoderImpl​(ModemMetrics aModemMetrics)
  • Method Details

    • 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
    • getModulatorStatus

      public ModulatorStatus getModulatorStatus()
      Description copied from interface: ModulatorStatusAccessor
      Retrieves the Modulator-Status from the Modulator-Status property.
      Specified by:
      getModulatorStatus in interface ModulatorStatusAccessor
      Returns:
      The Modulator-Status stored by the Modulator-Status property.
    • 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()