public interface InputReader extends Closeable
For safe usage in InputReaderTask implementation of this
interface has to be responsive to interruption.
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the reader releasing the resources held by it.
|
int |
readInput(InputProcessor processor)
Reads some input and process it through the processor (if any).
|
int readInput(@NullAllowed InputProcessor processor) throws IOException
Implementation of this method has to be non blocking
for safe usage in InputReaderTask.
processor - consumer of read characters, mey be nullIOException - if any read or process error occursvoid close()
throws IOException
close in interface AutoCloseableclose in interface CloseableIOExceptionBuilt on June 18 2013. | Portions Copyright 1997-2013 Oracle. All rights reserved.