rj.tools.util
Class SubstitutionInputStream

java.lang.Object
  extended byjava.io.InputStream
      extended byjava.io.FilterInputStream
          extended byrj.tools.util.SubstitutionInputStream

public class SubstitutionInputStream
extends java.io.FilterInputStream

Version:
__0.98.1__
Author:
jochamrm

Field Summary
 
Fields inherited from class java.io.FilterInputStream
in
 
Constructor Summary
SubstitutionInputStream(java.io.InputStream inputStream, char target, java.lang.String replacement)
          Creates a new instance
 
Method Summary
 int read()
          Reads the next byte of data from this input stream.
 
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, read, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubstitutionInputStream

public SubstitutionInputStream(java.io.InputStream inputStream,
                               char target,
                               java.lang.String replacement)
Creates a new instance

Parameters:
inputStream - stream to parse and replace targets; must not be null
target - char to be replaced; must not be null
replacement - replacement; must not be null
Method Detail

read

public int read()
         throws java.io.IOException
Reads the next byte of data from this input stream. The value byte is returned as an int in the range 0 to 255. If no byte is available because the end of the stream has been reached, the value -1 is returned. This method blocks until input data is available, the end of the stream is detected, or an exception is thrown.

This method simply performs in.read() and returns the result.

Returns:
the next byte of data, or -1 if the end of the stream is reached.
Throws:
java.io.IOException - if an I/O error occurs.
See Also:
FilterInputStream.in


(c) 1999-2005 by Ralph Jocham (rjocham72@netscape.net)
JCSC is released under the terms of the GNU General Public License