|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.OutputStream
java.io.FilterOutputStream
installer.TarOutputStream
The TarOutputStream writes a UNIX tar archive as an OutputStream. Methods are provided to put entries, and then write their contents by writing to this stream using write().
TarBuffer
,
TarHeader
,
TarEntry
Field Summary | |
protected byte[] |
assemBuf
|
protected int |
assemLen
|
protected TarBuffer |
buffer
|
protected int |
currBytes
|
protected int |
currSize
|
protected boolean |
debug
|
protected byte[] |
oneBuf
|
protected byte[] |
recordBuf
|
Fields inherited from class java.io.FilterOutputStream |
out |
Constructor Summary | |
TarOutputStream(OutputStream os)
|
|
TarOutputStream(OutputStream os,
int blockSize)
|
|
TarOutputStream(OutputStream os,
int blockSize,
int recordSize)
|
Method Summary | |
void |
close()
Ends the TAR archive and closes the underlying OutputStream. |
void |
closeEntry()
Close an entry. |
void |
finish()
Ends the TAR archive without closing the underlying OutputStream. |
int |
getRecordSize()
Get the record size being used by this stream's TarBuffer. |
void |
putNextEntry(TarEntry entry)
Put an entry on the output stream. |
void |
setBufferDebug(boolean debug)
Sets the debugging flag in this stream's TarBuffer. |
void |
setDebug(boolean debugF)
Sets the debugging flag. |
void |
write(byte[] wBuf)
Writes bytes to the current tar archive entry. |
void |
write(byte[] wBuf,
int wOffset,
int numToWrite)
Writes bytes to the current tar archive entry. |
void |
write(int b)
Writes a byte to the current tar archive entry. |
Methods inherited from class java.io.FilterOutputStream |
flush |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected boolean debug
protected int currSize
protected int currBytes
protected byte[] oneBuf
protected byte[] recordBuf
protected int assemLen
protected byte[] assemBuf
protected TarBuffer buffer
Constructor Detail |
public TarOutputStream(OutputStream os)
public TarOutputStream(OutputStream os, int blockSize)
public TarOutputStream(OutputStream os, int blockSize, int recordSize)
Method Detail |
public void setDebug(boolean debugF)
debugF
- True to turn on debugging.public void setBufferDebug(boolean debug)
public void finish() throws IOException
IOException
public void close() throws IOException
IOException
public int getRecordSize()
public void putNextEntry(TarEntry entry) throws IOException
entry
- The TarEntry to be written to the archive.
IOException
public void closeEntry() throws IOException
IOException
public void write(int b) throws IOException
b
- The byte written.
IOException
public void write(byte[] wBuf) throws IOException
wBuf
- The buffer to write to the archive.
IOException
public void write(byte[] wBuf, int wOffset, int numToWrite) throws IOException
wBuf
- The buffer to write to the archive.wOffset
- The offset in the buffer from which to get bytes.numToWrite
- The number of bytes to write.
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |