ORO, Inc. Logo  All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.oroinc.text.regex.Perl5StreamInput

java.lang.Object
   |
   +----com.oroinc.text.regex.Perl5StreamInput

public final class Perl5StreamInput
extends Object
The Perl5StreamInput class is used to look for pattern matches in a character stream obtained from an InputStream or Reader in conjunction with the Perl5Matcher class. It is called Perl5StreamInput instead of Perl5InputStream to stress that it is a form of input for the Perl5Matcher rather than a subclass of InputStream. Perl5StreamInput 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. You should avoid using buffer increments smaller than 4096 bytes, as they will adversely affect peformance.

If you want to perform line by line matches on a Reader, you should use the BufferedReader class and its readLine() method in conjunction with one of the PatternMatcher methods taking a String, char[], or PatternMatcherInput as an argument.

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.

Copyright © 1997 Original Resuable Objects, Inc. All rights reserved.

Author:
Daniel F. Savarese
See Also:
Perl5Matcher

Constructor Index

 o Perl5StreamInput(InputStream)
Creates a Perl5StreamInput instance bound to a Reader with an initial buffer size and default buffer increment of 4096 bytes.
 o Perl5StreamInput(InputStream, int)
Creates a Perl5StreamInput instance bound to an InputStream with a specified initial buffer size and default buffer increment.
 o Perl5StreamInput(Reader)
Creates a Perl5StreamInput instance bound to a Reader with an initial buffer size and default buffer increment of 4096 bytes.
 o Perl5StreamInput(Reader, int)
Creates a Perl5StreamInput instance bound to a Reader with a specified initial buffer size and default buffer increment.

Method Index

 o endOfStream()

Constructors

 o Perl5StreamInput
 public Perl5StreamInput(Reader input,
                         int bufferIncrement)
Creates a Perl5StreamInput instance bound to a Reader with a specified initial buffer size and default buffer increment.

Parameters:
input - The Reader to associate with the Perl5StreamInput instance.
bufferIncrement - The initial buffer size and the default buffer increment to use when the input buffer has to be increased in size.
 o Perl5StreamInput
 public Perl5StreamInput(Reader input)
Creates a Perl5StreamInput instance bound to a Reader with an initial buffer size and default buffer increment of 4096 bytes.

Parameters:
input - The InputStream to associate with the Perl5StreamInput instance.
 o Perl5StreamInput
 public Perl5StreamInput(InputStream input,
                         int bufferIncrement)
Creates a Perl5StreamInput instance bound to an InputStream with a specified initial buffer size and default buffer increment.

Parameters:
input - The InputStream to associate with the Perl5StreamInput instance.
bufferIncrement - The initial buffer size and the default buffer increment to use when the input buffer has to be increased in size.
 o Perl5StreamInput
 public Perl5StreamInput(InputStream input)
Creates a Perl5StreamInput instance bound to a Reader with an initial buffer size and default buffer increment of 4096 bytes.

Parameters:
input - The InputStream to associate with the Perl5StreamInput instance.

Methods

 o endOfStream
 public boolean endOfStream()

ORO, Inc. Logo  All Packages  Class Hierarchy  This Package  Previous  Next  Index