Interface InputAccessor
-
- All Known Implementing Classes:
InputAccessor.Std
public interface InputAccessorInterface used to expose beginning of a data file to data format detection code.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classInputAccessor.StdBasic implementation that reads data from givenInputStreamand buffers it as necessary.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanhasMoreBytes()Method to call to check if more input is available.bytenextByte()Returns next byte available, if any; if no more bytes are available, will throwEOFException.voidreset()Method that can be called to reset accessor to read from beginning of input.
-
-
-
Method Detail
-
hasMoreBytes
boolean hasMoreBytes() throws java.io.IOExceptionMethod to call to check if more input is available. Since this may result in more content to be read (at least one more byte), aIOExceptionmay get thrown.- Returns:
- Whether there is at least one more input byte accessible
- Throws:
java.io.IOException- If check for more content failed due to issue with underlying input abstraction
-
nextByte
byte nextByte() throws java.io.IOExceptionReturns next byte available, if any; if no more bytes are available, will throwEOFException.- Returns:
- Next content byte, if available
- Throws:
java.io.IOException- If called and there is no more content available
-
reset
void reset()
Method that can be called to reset accessor to read from beginning of input.
-
-