-
- All Superinterfaces:
AutoCloseable
,Closeable
- All Known Implementing Classes:
BufferByteInput
,ByteInputAdapter
,DataByteInput
,StreamByteInput
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface ByteInput extends Closeable
An interface for reading bytes.- Author:
- Jin Kwon <jinahya_at_gmail.com>
- See Also:
ByteOutput
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
close()
Closes this input and releases any system resources associated with it.int
read()
Reads an unsigned 8-bit value.
-
-
-
Method Detail
-
close
default void close() throws IOException
Closes this input and releases any system resources associated with it.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
- if an I/O error occurs.
-
read
int read() throws IOException
Reads an unsigned 8-bit value.- Returns:
- an unsigned 8-bit value; between
0
and255
, both inclusive. - Throws:
EOFException
- if reached to an end.IOException
- if an I/O error occurs.
-
-