类 AwkStreamInput
java.lang.Object
org.apache.oro.text.awk.AwkStreamInput
The AwkStreamInput class is used to look for pattern matches in an
input stream (actually a java.io.Reader instance) in conjunction with
the AwkMatcher class. It is called
AwkStreamInput instead of AwkInputStream to stress that it is a form
of streamed input for the AwkMatcher class to use rather than a subclass of
InputStream.
AwkStreamInput performs special internal buffering to accelerate
pattern searches through a stream. You can determine the size of this
buffer and how it grows by using the appropriate constructor.
If you want to perform line by line matches on an input stream, you should use a DataInput or BufferedReader instance in conjunction with one of the PatternMatcher methods taking a String, char[], or PatternMatcherInput as an argument. The DataInput and BufferedReader readLine() methods will likely be implemented as native methods and therefore more efficient than supporting line by line searching within AwkStreamInput.
In the future the programmer will be able to set this class to save all the input it sees so that it can be accessed later. This will avoid having to read a stream more than once for whatever reason.
- 从以下版本开始:
- 1.0
- 版本:
- ,
- 另请参阅:
-
构造器概要
构造器构造器说明AwkStreamInput(Reader input) Creates an AwkStreamInput instance bound to a Reader with an initial buffer size and default buffer increment of 2048 bytes.AwkStreamInput(Reader input, int bufferIncrement) Creates an AwkStreamInput instance bound to a Reader with a specified initial buffer size and default buffer increment. -
方法概要
-
构造器详细资料
-
AwkStreamInput
Creates an AwkStreamInput instance bound to a Reader with a specified initial buffer size and default buffer increment.- 参数:
input- The InputStream to associate with the AwkStreamInput instance.bufferIncrement- The initial buffer size and the default buffer increment to use when the input buffer has to be increased in size.
-
AwkStreamInput
Creates an AwkStreamInput instance bound to a Reader with an initial buffer size and default buffer increment of 2048 bytes.- 参数:
input- The InputStream to associate with the AwkStreamInput instance.
-
-
方法详细资料
-
endOfStream
public boolean endOfStream()
-