opendap.servlet
Class DummySink
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
java.util.zip.DeflaterOutputStream
opendap.servlet.DummySink
- All Implemented Interfaces:
- java.io.Closeable, java.io.Flushable
public class DummySink
- extends java.util.zip.DeflaterOutputStream
The Servlet to exercise what's available.
- Author:
- Nathan David Potter
Fields inherited from class java.util.zip.DeflaterOutputStream |
buf, def |
Fields inherited from class java.io.FilterOutputStream |
out |
Constructor Summary |
DummySink(java.io.OutputStream out)
Creates a new output stream with a defaul compressor and buffer size. |
DummySink(java.io.OutputStream out,
java.util.zip.Deflater def)
Creates a new output stream with the specified compressor and
a default buffer size. |
DummySink(java.io.OutputStream out,
java.util.zip.Deflater def,
int size)
Creates a new output stream with the specified compressor and
buffer size. |
Methods inherited from class java.util.zip.DeflaterOutputStream |
deflate, finish |
Methods inherited from class java.io.FilterOutputStream |
write |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DummySink
public DummySink(java.io.OutputStream out,
java.util.zip.Deflater def,
int size)
- Creates a new output stream with the specified compressor and
buffer size.
- Parameters:
out
- the output streamdef
- the compressor ("deflater")
- Throws:
java.lang.IllegalArgumentException
- if size is <= 0
DummySink
public DummySink(java.io.OutputStream out,
java.util.zip.Deflater def)
- Creates a new output stream with the specified compressor and
a default buffer size.
- Parameters:
out
- the output streamdef
- the compressor ("deflater")
DummySink
public DummySink(java.io.OutputStream out)
- Creates a new output stream with a defaul compressor and buffer size.
close
public void close()
- Specified by:
close
in interface java.io.Closeable
- Overrides:
close
in class java.util.zip.DeflaterOutputStream
flush
public void flush()
- Specified by:
flush
in interface java.io.Flushable
- Overrides:
flush
in class java.io.FilterOutputStream
write
public void write(int b)
throws java.io.IOException
- Overrides:
write
in class java.util.zip.DeflaterOutputStream
- Throws:
java.io.IOException
write
public void write(byte[] b,
int off,
int len)
throws java.io.IOException
- Writes an array of bytes to the compressed output stream. This
method will block until all the bytes are written.
- Overrides:
write
in class java.util.zip.DeflaterOutputStream
- Parameters:
off
- the start offset of the datalen
- the length of the data
- Throws:
java.io.IOException
- if an I/O error has occurred
getCount
public int getCount()
setCount
public void setCount(int c)
resetCount
public void resetCount()