Class TarResource
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.types.DataType
org.apache.tools.ant.types.Resource
org.apache.tools.ant.types.resources.ArchiveResource
org.apache.tools.ant.types.resources.TarResource
- All Implemented Interfaces:
- Cloneable,- Comparable<Resource>,- Iterable<Resource>,- ResourceCollection
A Resource representation of an entry in a tar archive.
- Since:
- Ant 1.7
- 
Field SummaryFields inherited from class org.apache.tools.ant.types.ResourceMAGIC, UNKNOWN_DATETIME, UNKNOWN_SIZEFields inherited from class org.apache.tools.ant.ProjectComponentdescription, location, project
- 
Constructor SummaryConstructorsConstructorDescriptionDefault constructor.TarResource(File a, TarEntry e) Construct a TarResource representing the specified entry in the specified archive.TarResource(Resource a, TarEntry e) Construct a TarResource representing the specified entry in the specified archive.
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidfetches information from the named entry inside the archive.intgetGid()Deprecated.getGroup()Return an InputStream for reading the contents of this Resource.bytelonglongGet an OutputStream for the Resource.protected TarResourcegetRef()Perform the check for circular references and return the referenced Resource.intgetUid()Deprecated.Methods inherited from class org.apache.tools.ant.types.resources.ArchiveResourceaddConfigured, checkEntry, compareTo, dieOnCircularReference, equals, getArchive, getLastModified, getMode, getSize, hashCode, isDirectory, isExists, setArchive, setMode, setRefid, toStringMethods inherited from class org.apache.tools.ant.types.Resourceas, asOptional, clone, getMagicNumber, getName, isFilesystemOnly, iterator, setDirectory, setExists, setLastModified, setName, setSize, 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- 
TarResourcepublic TarResource()Default constructor.
- 
TarResource
- 
TarResource
 
- 
- 
Method Details- 
getInputStreamReturn an InputStream for reading the contents of this Resource.- Overrides:
- getInputStreamin class- Resource
- Returns:
- an InputStream object.
- Throws:
- IOException- if the tar file cannot be opened, or the entry cannot be read.
 
- 
getOutputStreamGet an OutputStream for the Resource.- Overrides:
- getOutputStreamin class- Resource
- Returns:
- an OutputStream to which content can be written.
- Throws:
- IOException- if unable to provide the content of this Resource as a stream.
- UnsupportedOperationException- if OutputStreams are not supported for this Resource type.
 
- 
getUserName- Returns:
- the user name for the tar entry
 
- 
getGroup- Returns:
- the group name for the tar entry
 
- 
getLongUidpublic long getLongUid()- Returns:
- the uid for the tar entry
- Since:
- 1.10.4
 
- 
getUid
- 
getLongGidpublic long getLongGid()- Returns:
- the gid for the tar entry
- Since:
- 1.10.4
 
- 
getGid
- 
getLinkName- Returns:
- the link "name" (=path) of this entry; an empty string if this is no link
- Since:
- 1.10.12
 
- 
getLinkFlagpublic byte getLinkFlag()- Returns:
- the link "flag" (=type) of this entry
- Since:
- 1.10.12
 
- 
fetchEntryprotected void fetchEntry()fetches information from the named entry inside the archive.- Specified by:
- fetchEntryin class- ArchiveResource
 
- 
getRefDescription copied from class:ResourcePerform the check for circular references and return the referenced Resource.- Overrides:
- getRefin class- ArchiveResource
- Returns:
- Resource.
 
 
-