public class GZipResource extends CompressedResource
Wraps around another resource, delegates all queries to that other resource but uncompresses/compresses streams on the fly.
MAGIC, UNKNOWN_DATETIME, UNKNOWN_SIZEdescription, location, project| Constructor and Description |
|---|
GZipResource()
A no-arg constructor
|
GZipResource(ResourceCollection other)
Constructor with another resource to wrap.
|
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
getCompressionName()
Get the name of the compression method.
|
protected java.io.InputStream |
wrapStream(java.io.InputStream in)
Decompress on the fly using java.util.zip.GZIPInputStream.
|
protected java.io.OutputStream |
wrapStream(java.io.OutputStream out)
Compress on the fly using java.util.zip.GZIPOutStream.
|
toStringas, getInputStream, getOutputStream, getSize, isAppendSupportedaddConfigured, compareTo, dieOnCircularReference, getLastModified, getName, getResource, hashCode, isDirectory, isExists, isFilesystemOnly, setDirectory, setExists, setLastModified, setName, setRefid, setSizeasOptional, clone, equals, getCheckedRef, getMagicNumber, iterator, size, toLongStringcheckAttributesAllowed, checkChildrenAllowed, circularReference, dieOnCircularReference, dieOnCircularReference, getCheckedRef, getCheckedRef, getCheckedRef, getDataTypeName, getRefid, invokeCircularReferenceCheck, isChecked, isReference, noChildrenAllowed, pushAndInvokeCircularReferenceCheck, setChecked, tooManyAttributesgetDescription, getLocation, getProject, log, log, setDescription, setLocation, setProjectfinalize, getClass, notify, notifyAll, wait, wait, waitisEmpty, streampublic GZipResource()
public GZipResource(ResourceCollection other)
other - the resource to wrap.protected java.io.InputStream wrapStream(java.io.InputStream in)
throws java.io.IOException
wrapStream in class ContentTransformingResourcein - the stream to wrap.java.io.IOException - if there is a problem.protected java.io.OutputStream wrapStream(java.io.OutputStream out)
throws java.io.IOException
wrapStream in class ContentTransformingResourceout - the stream to wrap.java.io.IOException - if there is a problem.protected java.lang.String getCompressionName()
getCompressionName in class CompressedResource