public class TarOutputStreamImpl extends FilterOutputStream
Kerry Menzel
| 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 |
out| Constructor and Description |
|---|
TarOutputStreamImpl(OutputStream os) |
TarOutputStreamImpl(OutputStream os,
int blockSize) |
TarOutputStreamImpl(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 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.
|
flushprotected boolean debug
protected long currSize
protected long currBytes
protected byte[] oneBuf
protected byte[] recordBuf
protected int assemLen
protected byte[] assemBuf
protected TarBuffer buffer
public TarOutputStreamImpl(OutputStream os)
public TarOutputStreamImpl(OutputStream os, int blockSize)
public TarOutputStreamImpl(OutputStream os, int blockSize, int recordSize)
public void setDebug(boolean debugF)
debugF - True to turn on debugging.public void setBufferDebug(boolean debug)
debug - True to turn on debugging.public void finish()
throws IOException
IOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class FilterOutputStreamIOExceptionpublic int getRecordSize()
public void putNextEntry(TarEntry entry) throws IOException
entry - The TarEntry to be written to the archive.IOExceptionpublic void closeEntry()
throws IOException
IOExceptionpublic void write(int b)
throws IOException
This method simply calls read( byte[], int, int ).
write in class FilterOutputStreamb - The byte written.IOExceptionpublic void write(byte[] wBuf)
throws IOException
This method simply calls read( byte[], int, int ).
write in class FilterOutputStreamwBuf - The buffer to write to the archive.IOExceptionpublic void write(byte[] wBuf,
int wOffset,
int numToWrite)
throws IOException
This method simply calls read( byte[], int, int ).
write in class 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.IOExceptionCopyright © 2024 JBoss by Red Hat. All rights reserved.