Package opendap.servlet
Class DummySink
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
java.util.zip.DeflaterOutputStream
opendap.servlet.DummySink
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
The Servlet to exercise what's available.
-
Field Summary
Fields inherited from class java.util.zip.DeflaterOutputStream
buf, defFields inherited from class java.io.FilterOutputStream
out -
Constructor Summary
ConstructorsConstructorDescriptionDummySink(OutputStream out) Creates a new output stream with a defaul compressor and buffer size.DummySink(OutputStream out, Deflater def) Creates a new output stream with the specified compressor and a default buffer size.DummySink(OutputStream out, Deflater def, int size) Creates a new output stream with the specified compressor and buffer size. -
Method Summary
Methods inherited from class java.util.zip.DeflaterOutputStream
deflate, finishMethods inherited from class java.io.FilterOutputStream
writeMethods inherited from class java.io.OutputStream
nullOutputStream
-
Constructor Details
-
DummySink
Creates a new output stream with the specified compressor and buffer size.- Parameters:
out- the output streamdef- the compressor ("deflater")- Throws:
IllegalArgumentException- if size is<= 0
-
DummySink
Creates a new output stream with the specified compressor and a default buffer size.- Parameters:
out- the output streamdef- the compressor ("deflater")
-
DummySink
Creates a new output stream with a defaul compressor and buffer size.
-
-
Method Details
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classDeflaterOutputStream
-
flush
public void flush()- Specified by:
flushin interfaceFlushable- Overrides:
flushin classDeflaterOutputStream
-
write
- Overrides:
writein classDeflaterOutputStream- Throws:
IOException
-
write
Writes an array of bytes to the compressed output stream. This method will block until all the bytes are written.- Overrides:
writein classDeflaterOutputStream- Parameters:
off- the start offset of the datalen- the length of the data- Throws:
IOException- if an I/O error has occurred
-
getCount
public int getCount() -
setCount
public void setCount(int c) -
resetCount
public void resetCount()
-