public class TarFile
extends java.lang.Object
Constructor and Description |
---|
TarFile(java.io.File file)
Create a new TarFile for the given file.
|
TarFile(java.lang.String filename)
Create a new TarFile for the given path name.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the tar file input stream.
|
java.util.Enumeration |
entries()
Returns an enumeration cataloguing the tar archive.
|
java.io.InputStream |
getInputStream(TarEntry entry)
Returns a new InputStream for the given file in the tar archive.
|
java.lang.String |
getName()
Returns the path name of the file this archive represents.
|
public TarFile(java.io.File file) throws TarException, java.io.IOException
file
- TarException
java.io.IOException
public TarFile(java.lang.String filename) throws TarException, java.io.IOException
filename
- TarException
java.io.IOException
public void close() throws java.io.IOException
java.io.IOException
- if the file cannot be successfully closedpublic java.util.Enumeration entries()
public java.io.InputStream getInputStream(TarEntry entry) throws TarException, java.io.IOException
entry
- TarException
java.io.IOException
public java.lang.String getName()