Methods Summary |
---|
protected void | fetchEntry()fetches information from the named entry inside the archive.
Resource archive = getArchive();
TarInputStream i = null;
try {
i = new TarInputStream(archive.getInputStream());
TarEntry te = null;
while ((te = i.getNextEntry()) != null) {
if (te.getName().equals(getName())) {
setEntry(te);
return;
}
}
} catch (IOException e) {
log(e.getMessage(), Project.MSG_DEBUG);
throw new BuildException(e);
} finally {
if (i != null) {
FileUtils.close(i);
}
}
setEntry(null);
|
public int | getGid()
if (isReference()) {
return ((TarResource) getCheckedRef()).getGid();
}
return uid;
|
public java.lang.String | getGroup()
if (isReference()) {
return ((TarResource) getCheckedRef()).getGroup();
}
return groupName;
|
public java.io.InputStream | getInputStream()Return an InputStream for reading the contents of this Resource.
if (isReference()) {
return ((Resource) getCheckedRef()).getInputStream();
}
Resource archive = getArchive();
final TarInputStream i = new TarInputStream(archive.getInputStream());
TarEntry te = null;
while ((te = i.getNextEntry()) != null) {
if (te.getName().equals(getName())) {
return i;
}
}
FileUtils.close(i);
throw new BuildException("no entry " + getName() + " in "
+ getArchive());
|
public java.io.OutputStream | getOutputStream()Get an OutputStream for the Resource.
if (isReference()) {
return ((Resource) getCheckedRef()).getOutputStream();
}
throw new UnsupportedOperationException(
"Use the tar task for tar output.");
|
public int | getUid()
if (isReference()) {
return ((TarResource) getCheckedRef()).getUid();
}
return uid;
|
public java.lang.String | getUserName()
if (isReference()) {
return ((TarResource) getCheckedRef()).getUserName();
}
return userName;
|
private void | setEntry(org.apache.tools.tar.TarEntry e)
if (e == null) {
setExists(false);
return;
}
setName(e.getName());
setExists(true);
setLastModified(e.getModTime().getTime());
setDirectory(e.isDirectory());
setSize(e.getSize());
setMode(e.getMode());
userName = e.getUserName();
groupName = e.getGroupName();
uid = e.getUserId();
gid = e.getGroupId();
|