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:
- java.lang.Cloneable,- java.lang.Comparable<Resource>,- java.lang.Iterable<Resource>,- ResourceCollection
 
 public class TarResource extends ArchiveResource A Resource representation of an entry in a tar archive.- Since:
- Ant 1.7
 
- 
- 
Field Summary- 
Fields inherited from class org.apache.tools.ant.types.ResourceMAGIC, UNKNOWN_DATETIME, UNKNOWN_SIZE
 - 
Fields inherited from class org.apache.tools.ant.ProjectComponentdescription, location, project
 
- 
 - 
Constructor SummaryConstructors Constructor Description TarResource()Default constructor.TarResource(java.io.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 Type Method Description protected voidfetchEntry()fetches information from the named entry inside the archive.intgetGid()Deprecated.java.lang.StringgetGroup()java.io.InputStreamgetInputStream()Return an InputStream for reading the contents of this Resource.longgetLongGid()longgetLongUid()java.io.OutputStreamgetOutputStream()Get an OutputStream for the Resource.protected TarResourcegetRef()Perform the check for circular references and return the referenced Resource.intgetUid()Deprecated.java.lang.StringgetUserName()- 
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, toString
 - 
Methods inherited from class org.apache.tools.ant.types.Resourceas, asOptional, clone, getMagicNumber, getName, isFilesystemOnly, iterator, setDirectory, setExists, setLastModified, setName, setSize, size, toLongString
 - 
Methods 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, tooManyAttributes
 - 
Methods inherited from class org.apache.tools.ant.ProjectComponentgetDescription, getLocation, getProject, log, log, setDescription, setLocation, setProject
 - 
Methods inherited from class java.lang.Objectfinalize, getClass, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface org.apache.tools.ant.types.ResourceCollectionisEmpty, stream
 
- 
 
- 
- 
- 
Constructor Detail- 
TarResourcepublic TarResource() Default constructor.
 - 
TarResourcepublic TarResource(java.io.File a, TarEntry e)Construct a TarResource representing the specified entry in the specified archive.- Parameters:
- a- the archive as File.
- e- the TarEntry.
 
 
- 
 - 
Method Detail- 
getInputStreampublic java.io.InputStream getInputStream() throws java.io.IOExceptionReturn an InputStream for reading the contents of this Resource.- Overrides:
- getInputStreamin class- Resource
- Returns:
- an InputStream object.
- Throws:
- java.io.IOException- if the tar file cannot be opened, or the entry cannot be read.
 
 - 
getOutputStreampublic java.io.OutputStream getOutputStream() throws java.io.IOExceptionGet an OutputStream for the Resource.- Overrides:
- getOutputStreamin class- Resource
- Returns:
- an OutputStream to which content can be written.
- Throws:
- java.io.IOException- if unable to provide the content of this Resource as a stream.
- java.lang.UnsupportedOperationException- if OutputStreams are not supported for this Resource type.
 
 - 
getUserNamepublic java.lang.String getUserName() - Returns:
- the user name for the tar entry
 
 - 
getGrouppublic java.lang.String getGroup() - Returns:
- the group name for the tar entry
 
 - 
getLongUidpublic long getLongUid() - Returns:
- the uid for the tar entry
- Since:
- 1.10.4
 
 - 
getUid@Deprecated public int getUid() Deprecated.- Returns:
- the uid for the tar entry
 
 - 
getLongGidpublic long getLongGid() - Returns:
- the gid for the tar entry
- Since:
- 1.10.4
 
 - 
getGid@Deprecated public int getGid() Deprecated.- Returns:
- the uid for the tar entry
 
 - 
fetchEntryprotected void fetchEntry() fetches information from the named entry inside the archive.- Specified by:
- fetchEntryin class- ArchiveResource
 
 - 
getRefprotected TarResource getRef() Description copied from class:ResourcePerform the check for circular references and return the referenced Resource.- Overrides:
- getRefin class- ArchiveResource
- Returns:
- Resource.
 
 
- 
 
-