iicm.vrml.pw
Class DecompressionStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
iicm.vrml.pw.DecompressionStream
- All Implemented Interfaces:
- java.io.Closeable
public class DecompressionStream
- extends java.io.FilterInputStream
Fields inherited from class java.io.FilterInputStream |
in |
Constructor Summary |
DecompressionStream(java.lang.String filename)
check whether the InputStream contains compressed data. |
Method Summary |
void |
close()
on close also destroy subprocess in case it is still running |
(package private) static java.lang.String |
cmdToString(java.lang.String s)
|
(package private) static java.lang.String |
cmdToString(java.lang.String[] arr)
|
Methods inherited from class java.io.FilterInputStream |
available, mark, markSupported, read, read, read, reset, skip |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
COMPRESSION_MAGIC
public static final int COMPRESSION_MAGIC
- magic number of compressed files
- See Also:
- Constant Field Values
gunzip_
private java.lang.Process gunzip_
DecompressionStream
public DecompressionStream(java.lang.String filename)
throws java.io.IOException
- check whether the InputStream contains compressed data. In this
case execute gunzip and return a stream of decompressed data.
If executing gunzip fails (e.g. not allowed for applets) or the
input data were not compressed, the original InputStream is
returned unchanged. Only works for standalone applications.
- Throws:
java.io.IOException
close
public void close()
throws java.io.IOException
- on close also destroy subprocess in case it is still running
- Specified by:
close
in interface java.io.Closeable
- Overrides:
close
in class java.io.FilterInputStream
- Throws:
java.io.IOException
cmdToString
static final java.lang.String cmdToString(java.lang.String[] arr)
cmdToString
static final java.lang.String cmdToString(java.lang.String s)