Class ShortArraySource

  • All Implemented Interfaces:
    ShortSource, ShortsSource, org.refcodes.struct.ShortArrayAccessor

    public class ShortArraySource
    extends Object
    implements ShortsSource, org.refcodes.struct.ShortArrayAccessor
    The Class ShortArraySource.
    • Constructor Detail

      • ShortArraySource

        public ShortArraySource()
    • Method Detail

      • transmitShort

        public void transmitShort​(short aShort)
                           throws IOException
        Writes (sends) a short.
        Specified by:
        transmitShort in interface ShortSource
        Specified by:
        transmitShort in interface ShortsSource
        Parameters:
        aShort - The short to be pushed.
        Throws:
        IOException - Thrown in case opening or accessing an open line (connection, junction, link) caused problems.
      • transmitShorts

        public void transmitShorts​(short[] aShorts,
                                   int aOffset,
                                   int aLength)
                            throws IOException
        Writes (sends) a short block.
        Specified by:
        transmitShorts in interface ShortsSource
        Parameters:
        aShorts - The short to be pushed.
        aOffset - The offset from which to take the data.
        aLength - The number of elements to push starting at the given offset.
        Throws:
        IOException - Thrown in case opening or accessing an open line (connection, junction, link) caused problems.
      • getShorts

        public short[] getShorts()
        Specified by:
        getShorts in interface org.refcodes.struct.ShortArrayAccessor