Class DataWrapper

  • All Implemented Interfaces:
    java.lang.Runnable

    public final class DataWrapper
    extends ReadablePacket<java.lang.Object>
    This class is a data wrapper that supply a basic interface that facilitates the reading of the incoming data.
    • Method Detail

      • read

        protected boolean read()
        Specified by:
        read in class ReadablePacket<java.lang.Object>
      • run

        public void run()
        Throws:
        java.lang.UnsupportedOperationException - - this method does nothing just throw
      • get

        public byte get()
        get the next byte from the underlying data.
        Returns:
        the next byte
      • getShort

        public short getShort()
        get the next short from the underlying data
        Returns:
        the next short
      • getInt

        public int getInt()
        get the next integer from the underlying data.
        Returns:
        the next integer
      • available

        public int available()
        Returns:
        the length in bytes of the remaining data.
      • expose

        public byte[] expose()
        Returns:
        the underlying data