org.netbeans.modules.extexecution/2 1.25.1

org.netbeans.api.extexecution.input
Interface InputReader

All Superinterfaces:
Closeable

public interface InputReader
extends Closeable

This interface represents abstraction for reading characters. It allows custom processing of such characters through the given processor.

For safe usage in InputReaderTask implementation of this interface has to be responsive to interruption.


Method Summary
 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).
 

Method Detail

readInput

int readInput(@NullAllowed
              InputProcessor processor)
              throws IOException
Reads some input and process it through the processor (if any).

Implementation of this method has to be non blocking for safe usage in InputReaderTask.

Parameters:
processor - consumer of read characters, mey be null
Returns:
number of characters read
Throws:
IOException - if any read or process error occurs

close

void close()
           throws IOException
Closes the reader releasing the resources held by it.

Specified by:
close in interface Closeable
Throws:
IOException

org.netbeans.modules.extexecution/2 1.25.1

Built on December 5 2011.  |  Portions Copyright 1997-2011 Sun Microsystems, Inc. All rights reserved.