Class BZip2Resource
- All Implemented Interfaces:
- Cloneable,- Comparable<Resource>,- Iterable<Resource>,- ResourceCollection
A Bzip2 compressed resource.
 
Wraps around another resource, delegates all queries to that other resource but uncompresses/compresses streams on the fly.
- Since:
- Ant 1.7
- 
Field SummaryFields inherited from class org.apache.tools.ant.types.ResourceUNKNOWN_DATETIME, UNKNOWN_SIZEFields inherited from class org.apache.tools.ant.ProjectComponentdescription, location, project
- 
Constructor SummaryConstructorsConstructorDescriptionA no-arg constructorBZip2Resource(ResourceCollection other) Constructor with another resource to wrap.
- 
Method SummaryModifier and TypeMethodDescriptionprotected StringGet the name of the compression method.protected InputStreamDecompress on the fly usingCBZip2InputStream.protected OutputStreamwrapStream(OutputStream out) Compress on the fly usingCBZip2OutputStream.Methods inherited from class org.apache.tools.ant.types.resources.CompressedResourcetoStringMethods inherited from class org.apache.tools.ant.types.resources.ContentTransformingResourceas, getInputStream, getOutputStream, getSize, isAppendSupportedMethods inherited from class org.apache.tools.ant.types.resources.ResourceDecoratoraddConfigured, compareTo, dieOnCircularReference, getLastModified, getName, getResource, hashCode, isDirectory, isExists, isFilesystemOnly, setDirectory, setExists, setLastModified, setName, setRefid, setSizeMethods inherited from class org.apache.tools.ant.types.ResourceasOptional, clone, equals, getMagicNumber, getRef, iterator, size, toLongStringMethods inherited from class org.apache.tools.ant.types.DataTypecheckAttributesAllowed, checkChildrenAllowed, circularReference, dieOnCircularReference, dieOnCircularReference, getCheckedRef, getCheckedRef, getCheckedRef, getCheckedRef, getCheckedRef, getDataTypeName, getRefid, invokeCircularReferenceCheck, isChecked, isReference, noChildrenAllowed, pushAndInvokeCircularReferenceCheck, setChecked, tooManyAttributesMethods inherited from class org.apache.tools.ant.ProjectComponentgetDescription, getLocation, getProject, log, log, setDescription, setLocation, setProjectMethods inherited from class java.lang.Objectfinalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.IterableforEach, spliteratorMethods inherited from interface org.apache.tools.ant.types.ResourceCollectionisEmpty, stream
- 
Constructor Details- 
BZip2Resourcepublic BZip2Resource()A no-arg constructor
- 
BZip2ResourceConstructor with another resource to wrap.- Parameters:
- other- the resource to wrap.
 
 
- 
- 
Method Details- 
wrapStreamDecompress on the fly usingCBZip2InputStream.- Specified by:
- wrapStreamin class- ContentTransformingResource
- Parameters:
- in- the stream to wrap.
- Returns:
- the wrapped stream.
- Throws:
- IOException- if there is a problem.
 
- 
wrapStreamCompress on the fly usingCBZip2OutputStream.- Specified by:
- wrapStreamin class- ContentTransformingResource
- Parameters:
- out- the stream to wrap.
- Returns:
- the wrapped stream.
- Throws:
- IOException- if there is a problem.
 
- 
getCompressionNameGet the name of the compression method.- Specified by:
- getCompressionNamein class- CompressedResource
- Returns:
- the string "Bzip2".
 
 
-