uPortal 2.4.1
API Documentation

org.jasig.portal.utils
Class SubstitutionWriter

java.lang.Object
  extended byjava.io.Writer
      extended byorg.jasig.portal.utils.SubstitutionWriter

public class SubstitutionWriter
extends java.io.Writer

A filter presenting a Writer that performs word substitution (search&replace) on the fly.

Version:
$Revision: 1.5 $
Author:
Peter Kharchenko

Constructor Summary
SubstitutionWriter(java.io.Writer out, char[] target, char[] substitute)
          Creates a new SubstitutionWriter instance.
SubstitutionWriter(java.io.Writer out, char[] target, char[] substitute, int bufferSize)
          Creates a new SubstitutionWriter instance.
 
Method Summary
 void close()
           
 void flush()
           
static void main(java.lang.String[] args)
          A test self-test method for the class.
 void write(char[] cbuf, int off, int len)
           
 void write(int i)
           
 
Methods inherited from class java.io.Writer
write, write, write
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubstitutionWriter

public SubstitutionWriter(java.io.Writer out,
                          char[] target,
                          char[] substitute,
                          int bufferSize)
Creates a new SubstitutionWriter instance.

Parameters:
out - a true Writer value where processed stream should be directed
target - a byte[] value of a target to be replaced
substitute - a byte[] value with which the target will be replaced
bufferSize - a size of the buffer

SubstitutionWriter

public SubstitutionWriter(java.io.Writer out,
                          char[] target,
                          char[] substitute)
Creates a new SubstitutionWriter instance.

Parameters:
out - a true Writer value where processed stream should be directed
target - a byte[] value of a target to be replaced
substitute - a byte[] value with which the target will be replaced
Method Detail

write

public void write(int i)
           throws java.io.IOException
Throws:
java.io.IOException

flush

public void flush()
           throws java.io.IOException
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Throws:
java.io.IOException

write

public void write(char[] cbuf,
                  int off,
                  int len)
           throws java.io.IOException
Throws:
java.io.IOException

main

public static void main(java.lang.String[] args)
A test self-test method for the class.


uPortal 2.4.1
API Documentation