public class TarOutputStream
extends java.io.FilterOutputStream
| Modifier and Type | Field and Description |
|---|---|
protected byte[] |
assemBuf |
protected int |
assemLen |
protected TarBuffer |
buffer |
protected long |
currBytes |
protected long |
currSize |
protected boolean |
debug |
protected byte[] |
oneBuf |
protected byte[] |
recordBuf |
| Constructor and Description |
|---|
TarOutputStream(java.io.OutputStream os) |
TarOutputStream(java.io.OutputStream os,
int blockSize) |
TarOutputStream(java.io.OutputStream os,
int blockSize,
int recordSize) |
| Modifier and Type | Method and Description |
|---|---|
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 isDebug)
Sets the debugging flag in this stream's TarBuffer.
|
void |
setDebug(boolean isDebug)
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.
|
protected boolean debug
protected long currSize
protected long currBytes
protected byte[] oneBuf
protected byte[] recordBuf
protected int assemLen
protected byte[] assemBuf
protected TarBuffer buffer
public TarOutputStream(java.io.OutputStream os)
public TarOutputStream(java.io.OutputStream os,
int blockSize)
public TarOutputStream(java.io.OutputStream os,
int blockSize,
int recordSize)
public void setDebug(boolean isDebug)
isDebug - True to turn on debugging.public void setBufferDebug(boolean isDebug)
isDebug - True to turn on debugging.public void finish()
throws java.io.IOException
java.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.FilterOutputStreamjava.io.IOExceptionpublic int getRecordSize()
public void putNextEntry(TarEntry entry) throws java.io.IOException
entry - The TarEntry to be written to the archive.java.io.IOExceptionpublic void closeEntry()
throws java.io.IOException
java.io.IOExceptionpublic void write(int b)
throws java.io.IOException
write in class java.io.FilterOutputStreamb - The byte written.java.io.IOExceptionpublic void write(byte[] wBuf)
throws java.io.IOException
write in class java.io.FilterOutputStreamwBuf - The buffer to write to the archive.java.io.IOExceptionpublic void write(byte[] wBuf,
int wOffset,
int numToWrite)
throws java.io.IOException
write in class java.io.FilterOutputStreamwBuf - 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.java.io.IOExceptionCopyright © 2014 EsprIT-Systems. All Rights Reserved.