public class TarOutputStream extends BufferedOutputStream
buf, count| Constructor and Description |
|---|
TarOutputStream(OutputStream out) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Appends the EOF record and closes the stream
|
protected void |
closeCurrentEntry()
Closes the current tar entry
|
protected void |
pad()
Pads the last content block
|
void |
putNextEntry(TarEntry entry)
Writes the next tar entry header on the stream
|
void |
write(byte[] b,
int off,
int len)
Checks if the bytes being written exceed the current entry size.
|
void |
write(int b)
Writes a byte to the stream and updates byte counters
|
flush, flushBuffer, getConnection, getDefaultBufferSize, getLastActivityTime, getName, getTotalBytesWritten, setConnection, setDefaultBufferSize, setProgressListener, writepublic TarOutputStream(OutputStream out)
public void close()
throws IOException
close in interface AutoCloseableclose in class BufferedOutputStreamIOException - if an I/O error occurs.FilterOutputStream.close()public void write(int b)
throws IOException
write in class BufferedOutputStreamb - the byte to be written.IOException - if an I/O error occurs.FilterOutputStream.write(int)public void write(byte[] b,
int off,
int len)
throws IOException
write in class BufferedOutputStreamb - the data.off - the start offset in the data.len - the number of bytes to write.IOException - if an I/O error occurs.FilterOutputStream.write(byte[], int, int)public void putNextEntry(TarEntry entry) throws IOException
entry - IOExceptionprotected void closeCurrentEntry()
throws IOException
IOExceptionprotected void pad()
throws IOException
IOException