javawebparts.filter
Class JSCompressionResStream

java.lang.Object
  |
  +--java.io.OutputStream
        |
        +--javax.servlet.ServletOutputStream
              |
              +--javawebparts.filter.JSCompressionResStream

public class JSCompressionResStream
extends javax.servlet.ServletOutputStream

This class is used to do compression.

Author:
Herman van Rosmalen.

Field Summary
private  java.io.ByteArrayOutputStream ba
          ByteArrayOutputStream ba.
 
Fields inherited from class javax.servlet.ServletOutputStream
 
Constructor Summary
JSCompressionResStream()
          Constructor.
 
Method Summary
 void close()
          Clean up.
 byte[] getData()
          return the collected output
 void write(int b)
          Writes a single byte to the output stream.
 
Methods inherited from class javax.servlet.ServletOutputStream
print, print, print, print, print, print, print, println, println, println, println, println, println, println, println
 
Methods inherited from class java.io.OutputStream
flush, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ba

private java.io.ByteArrayOutputStream ba
ByteArrayOutputStream ba.

Constructor Detail

JSCompressionResStream

public JSCompressionResStream()
Constructor.

Method Detail

write

public void write(int b)
           throws java.io.IOException
Writes a single byte to the output stream.

Specified by:
write in class java.io.OutputStream
Parameters:
b - A single byte to write.
Throws:
java.io.IOException - IOException.

close

public void close()
           throws java.io.IOException
Clean up.

Overrides:
close in class java.io.OutputStream
Throws:
java.io.IOException - IOException.

getData

public byte[] getData()
return the collected output

Returns:
byte[] the collected output


Copyright © 2005 Frank W. Zammetti