public class ArArchiveOutputStream extends ArchiveOutputStream
| Modifier and Type | Field | Description |
|---|---|---|
static int |
LONGFILE_BSD |
BSD ar extensions are used to store long file names in the archive.
|
static int |
LONGFILE_ERROR |
Fail if a long file name is required in the archive.
|
| Constructor | Description |
|---|---|
ArArchiveOutputStream(java.io.OutputStream pOut) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
close() |
Calls finish if necessary, and then closes the OutputStream
|
void |
closeArchiveEntry() |
Closes the archive entry, writing any trailer information that may
be required.
|
ArchiveEntry |
createArchiveEntry(java.io.File inputFile,
java.lang.String entryName) |
Create an archive entry using the inputFile and entryName provided.
|
void |
finish() |
Finishes the addition of entries to this stream, without closing it.
|
void |
putArchiveEntry(ArchiveEntry pEntry) |
Writes the headers for an archive entry to the output stream.
|
void |
setLongFileMode(int longFileMode) |
Set the long file mode.
|
void |
write(byte[] b,
int off,
int len) |
canWriteEntryData, count, count, getBytesWritten, getCount, writepublic static final int LONGFILE_ERROR
public static final int LONGFILE_BSD
public ArArchiveOutputStream(java.io.OutputStream pOut)
public void setLongFileMode(int longFileMode)
longFileMode - the mode to usepublic void closeArchiveEntry() throws java.io.IOException
ArchiveOutputStreamcloseArchiveEntry in class ArchiveOutputStreamjava.io.IOException - if an I/O error occurspublic void putArchiveEntry(ArchiveEntry pEntry) throws java.io.IOException
ArchiveOutputStreamArchiveOutputStream.closeArchiveEntry() to complete the process.putArchiveEntry in class ArchiveOutputStreampEntry - describes the entryjava.io.IOException - if an I/O error occurspublic void write(byte[] b, int off, int len) throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionpublic void close() throws java.io.IOException
close in class java.io.OutputStreamjava.io.IOExceptionpublic ArchiveEntry createArchiveEntry(java.io.File inputFile, java.lang.String entryName) throws java.io.IOException
ArchiveOutputStreamcreateArchiveEntry in class ArchiveOutputStreaminputFile - the file to create the entry fromentryName - name to use for the entryjava.io.IOException - if an I/O error occurspublic void finish() throws java.io.IOException
ArchiveOutputStreamfinish in class ArchiveOutputStreamjava.io.IOException - if the user forgets to close the entry.