Top Description Fields Constructors Methods
org.apache.tools.ant.types.resources

public Class TarResource

extends ArchiveResource
Class Inheritance
Imports
java.io.File, .IOException, .InputStream, .OutputStream, org.apache.tools.ant.BuildException, .Project, org.apache.tools.ant.types.Resource, org.apache.tools.ant.util.FileUtils, org.apache.tools.tar.TarConstants, .TarEntry, .TarInputStream

A Resource representation of an entry in a tar archive.
Since
Ant 1.7

Field Summary

Modifier and TypeField and Description
private long
private String
private byte
private String
private long
private String

Constructor Summary

AccessConstructor and Description
public
TarResource()

Default constructor.

public
TarResource(File
the archive as File.
a
,
TarEntry
the TarEntry.
e
)

Construct a TarResource representing the specified entry in the specified archive.

public
TarResource(Resource
the archive as Resource.
a
,
TarEntry
the TarEntry.
e
)

Construct a TarResource representing the specified entry in the specified archive.

Method Summary

Modifier and TypeMethod and Description
protected void
fetchEntry()

Implements abstract org.apache.tools.ant.types.resources.ArchiveResource.fetchEntry.

fetches information from the named entry inside the archive.
public int

Returns:

the uid for the tar entry
getGid
()

Deprecated
public String

Returns:

the group name for the tar entry
getGroup
()

public InputStream

Returns:

an InputStream object.
getInputStream
()

Overrides org.apache.tools.ant.types.Resource.getInputStream.

Return an InputStream for reading the contents of this Resource.
public byte

Returns:

the link "flag" (=type) of this entry
getLinkFlag
()

public String

Returns:

the link "name" (=path) of this entry; an empty string if this is no link
getLinkName
()

public long

Returns:

the gid for the tar entry
getLongGid
()

public long

Returns:

the uid for the tar entry
getLongUid
()

public OutputStream

Returns:

an OutputStream to which content can be written.
getOutputStream
()

Overrides org.apache.tools.ant.types.Resource.getOutputStream.

Get an OutputStream for the Resource.
protected TarResource
getRef()

Overrides org.apache.tools.ant.types.resources.ArchiveResource.getRef.

Perform the check for circular references and return the referenced Resource.
public int

Returns:

the uid for the tar entry
getUid
()

Deprecated
public String

Returns:

the user name for the tar entry
getUserName
()

private void
Inherited from org.apache.tools.ant.types.resources.ArchiveResource:
addConfiguredcheckEntrycompareTodieOnCircularReferenceequalsgetArchivegetLastModifiedgetModegetSizehashCodeisDirectoryisExistssetArchivesetModesetRefidtoString

Field Detail

gidback to summary
private long gid
groupNameback to summary
private String groupName
linkFlagback to summary
private byte linkFlag
linkNameback to summary
private String linkName
uidback to summary
private long uid
userNameback to summary
private String userName

Constructor Detail

TarResourceback to summary
public TarResource()

Default constructor.

TarResourceback to summary
public TarResource(File a, TarEntry e)

Construct a TarResource representing the specified entry in the specified archive.

Parameters
a:File

the archive as File.

e:TarEntry

the TarEntry.

TarResourceback to summary
public TarResource(Resource a, TarEntry e)

Construct a TarResource representing the specified entry in the specified archive.

Parameters
a:Resource

the archive as Resource.

e:TarEntry

the TarEntry.

Method Detail

fetchEntryback to summary
protected void fetchEntry()

Implements abstract org.apache.tools.ant.types.resources.ArchiveResource.fetchEntry.

fetches information from the named entry inside the archive.

Annotations
@Override
getGidback to summary
public int getGid()

Deprecated

Returns:int

the uid for the tar entry

Annotations
@Deprecated
getGroupback to summary
public String getGroup()
Returns:String

the group name for the tar entry

getInputStreamback to summary
public InputStream getInputStream() throws IOException

Overrides org.apache.tools.ant.types.Resource.getInputStream.

Return an InputStream for reading the contents of this Resource.

Returns:InputStream

an InputStream object.

Annotations
@Override
Exceptions
IOException:
if the tar file cannot be opened, or the entry cannot be read.
getLinkFlagback to summary
public byte getLinkFlag()
Returns:byte

the link "flag" (=type) of this entry

Since
1.10.12
getLinkNameback to summary
public String getLinkName()
Returns:String

the link "name" (=path) of this entry; an empty string if this is no link

Since
1.10.12
getLongGidback to summary
public long getLongGid()
Returns:long

the gid for the tar entry

Since
1.10.4
getLongUidback to summary
public long getLongUid()
Returns:long

the uid for the tar entry

Since
1.10.4
getOutputStreamback to summary
public OutputStream getOutputStream() throws IOException

Overrides org.apache.tools.ant.types.Resource.getOutputStream.

Get an OutputStream for the Resource.

Returns:OutputStream

an OutputStream to which content can be written.

Annotations
@Override
Exceptions
IOException:
if unable to provide the content of this Resource as a stream.
UnsupportedOperationException:
if OutputStreams are not supported for this Resource type.
getRefback to summary
protected TarResource getRef()

Overrides org.apache.tools.ant.types.resources.ArchiveResource.getRef.

Doc from org.apache.tools.ant.types.Resource.getRef.

Perform the check for circular references and return the referenced Resource.

Returns:TarResource

Resource.

Annotations
@Override
getUidback to summary
public int getUid()

Deprecated

Returns:int

the uid for the tar entry

Annotations
@Deprecated
getUserNameback to summary
public String getUserName()
Returns:String

the user name for the tar entry

setEntryback to summary
private void setEntry(TarEntry e)