public class ArArchiveOutputStream extends ArchiveOutputStream
| Modifier and Type | Field and Description |
|---|---|
private long |
archiveOffset |
private long |
entryOffset |
private boolean |
finished
indicates if this archive is finished
|
private boolean |
haveUnclosedEntry |
private java.io.OutputStream |
out |
private ArArchiveEntry |
prevEntry |
| Constructor and Description |
|---|
ArArchiveOutputStream(java.io.OutputStream pOut) |
| 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(java.io.File inputFile,
java.lang.String entryName)
Create an archive entry using the inputFile and entryName provided.
|
private long |
fill(long pOffset,
long pNewOffset,
char pFill) |
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 |
write(byte[] b,
int off,
int len) |
private long |
write(java.lang.String data) |
private long |
writeArchiveHeader() |
private long |
writeEntryHeader(ArArchiveEntry pEntry) |
canWriteEntryData, count, count, getBytesWritten, getCount, writeprivate final java.io.OutputStream out
private long archiveOffset
private long entryOffset
private ArArchiveEntry prevEntry
private boolean haveUnclosedEntry
private boolean finished
private long writeArchiveHeader()
throws java.io.IOException
java.io.IOExceptionpublic void closeArchiveEntry()
throws java.io.IOException
closeArchiveEntry in class ArchiveOutputStreamjava.io.IOExceptionpublic void putArchiveEntry(ArchiveEntry pEntry) throws java.io.IOException
ArchiveOutputStream.closeArchiveEntry() to complete the process.putArchiveEntry in class ArchiveOutputStreampEntry - describes the entryjava.io.IOExceptionprivate long fill(long pOffset,
long pNewOffset,
char pFill)
throws java.io.IOException
java.io.IOExceptionprivate long write(java.lang.String data)
throws java.io.IOException
java.io.IOExceptionprivate long writeEntryHeader(ArArchiveEntry pEntry) throws java.io.IOException
java.io.IOExceptionpublic 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 interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.OutputStreamjava.io.IOExceptionpublic ArchiveEntry createArchiveEntry(java.io.File inputFile, java.lang.String entryName) throws java.io.IOException
createArchiveEntry in class ArchiveOutputStreamjava.io.IOExceptionpublic void finish()
throws java.io.IOException
finish in class ArchiveOutputStreamjava.io.IOException