public class ArArchiveOutputStream extends ArchiveOutputStream
| Modifier and Type | Field and 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 and Description |
|---|
ArArchiveOutputStream(OutputStream
|
| Modifier and Type | Method and 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(File
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
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, writeflush, writepublic static final int LONGFILE_ERROR
public static final int LONGFILE_BSD
public ArArchiveOutputStream(OutputStreampOut)
public void setLongFileMode(int longFileMode)
longFileMode - the mode to use
public void closeArchiveEntry()
throws IOException
ArchiveOutputStream
closeArchiveEntry in class
ArchiveOutputStream
IOException -
public void putArchiveEntry(ArchiveEntrypEntry) throws IOException
ArchiveOutputStream
ArchiveOutputStream.closeArchiveEntry() to complete the process.
putArchiveEntry in class
ArchiveOutputStream
pEntry - describes the entry
IOException -
public void write(byte[] b,
int off,
int len)
throws IOException
write in class
OutputStream
IOException
public void close()
throws IOException
close in interface
Closeable
close in interface
AutoCloseable
close in class
OutputStream
IOException
public ArchiveEntrycreateArchiveEntry(File inputFile, String entryName) throws IOException
ArchiveOutputStream
createArchiveEntry in class
ArchiveOutputStream
IOException -
public void finish()
throws IOException
ArchiveOutputStream
finish in class
ArchiveOutputStream
IOException - if the user forgets to close the entry.