|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.threerings.jpkg.ar.Archive
public class Archive
Creates and works with Unix ar(1) archives.
Field Summary | |
---|---|
static byte[] |
AR_MAGIC
The magic header which starts every ar archive. |
static String |
CHAR_ENCODING
The character encoding all text added to the archive will be translated into. |
static int |
FILE_HEADER_LENGTH
The length of the header that appears before every file in the archive. |
static byte[] |
PADDING
The byte used to pad data. |
Constructor Summary | |
---|---|
Archive(File path)
Construct a new archive at the supplied File path. |
Method Summary | |
---|---|
void |
appendEntry(ArchiveEntry entry)
Append the contents of the supplied ArchiveEntry to this archive. |
protected void |
finalize()
Make sure the OutputStream gets closed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String CHAR_ENCODING
public static final byte[] AR_MAGIC
public static final byte[] PADDING
public static final int FILE_HEADER_LENGTH
Constructor Detail |
---|
public Archive(File path) throws InvalidMagicException, IOException
File
path. If the path already exists and is
an ar(1) archive, open the archive for appending.
InvalidMagicException
- If the file being appended to is an invalid ar(1) archive.
IOException
- If any exception occurs during file i/o.Method Detail |
---|
public void appendEntry(ArchiveEntry entry) throws PathnameInvalidException, PathnameTooLongException, DataTooLargeException, IOException
ArchiveEntry
to this archive.
entry
- The ArchiveEntry
to add to the archive.
PathnameTooLongException
- If the path name is too long for an ar(1) archive.
PathnameInvalidException
- If the path name is invalid, e.g. contains a space.
DataTooLargeException
- If the data contained in the entry is too large for an ar(1) archive.
IOException
- If any exception occurs during data i/o.protected void finalize() throws Throwable
OutputStream
gets closed.
finalize
in class Object
Throwable
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |