Class ByteInputAdapter<T>

    • Constructor Detail

      • ByteInputAdapter

        public ByteInputAdapter​(Supplier<? extends T> sourceSupplier)
        Creates a new instance with specified source supplier.
        Parameters:
        sourceSupplier - the source supplier.
    • Method Detail

      • read

        public int read()
                 throws IOException
        Reads an unsigned 8-bit value. The read() method of ByteInputAdapter class invokes read(Object) with a byte source and returns the result.
        Specified by:
        read in interface ByteInput
        Returns:
        an unsigned 8-bit value; between 0 and 255, both inclusive.
        Throws:
        IOException - if an I/O error occurs.
      • read

        protected abstract int read​(T source)
                             throws IOException
        Reads an 8-bit unsigned int value from specified source.
        Parameters:
        source - the source from which an 8-bit unsigned int value is read.
        Returns:
        an 8-bit unsigned int value read from the source.
        Throws:
        IOException - if an I/O error occurs.