public class BZip2Resource extends CompressedResource
Wraps around another resource, delegates all quries to that other resource but uncompresses/compresses streams on the fly.
UNKNOWN_DATETIME, UNKNOWN_SIZE
description, location, project
Constructor and Description |
---|
BZip2Resource()
A no-arg constructor
|
BZip2Resource(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
CBZip2InputStream . |
protected java.io.OutputStream |
wrapStream(java.io.OutputStream out)
Compress on the fly using
CBZip2OutputStream . |
toString
as, getInputStream, getOutputStream, getSize, isAppendSupported
addConfigured, compareTo, dieOnCircularReference, getLastModified, getName, getResource, hashCode, isDirectory, isExists, isFilesystemOnly, setDirectory, setExists, setLastModified, setName, setRefid, setSize
clone, equals, getMagicNumber, iterator, size, toLongString
checkAttributesAllowed, checkChildrenAllowed, circularReference, dieOnCircularReference, dieOnCircularReference, getCheckedRef, getCheckedRef, getCheckedRef, getCheckedRef, getDataTypeName, getRefid, invokeCircularReferenceCheck, isChecked, isReference, noChildrenAllowed, pushAndInvokeCircularReferenceCheck, setChecked, tooManyAttributes
getDescription, getLocation, getProject, log, log, setDescription, setLocation, setProject
public BZip2Resource()
public BZip2Resource(ResourceCollection other)
other
- the resource to wrap.protected java.io.InputStream wrapStream(java.io.InputStream in) throws java.io.IOException
CBZip2InputStream
.wrapStream
in class ContentTransformingResource
in
- 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
CBZip2OutputStream
.wrapStream
in class ContentTransformingResource
out
- the stream to wrap.java.io.IOException
- if there is a problem.protected java.lang.String getCompressionName()
getCompressionName
in class CompressedResource