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, write
public TarOutputStream(OutputStream out)
public void close() throws IOException
close
in interface AutoCloseable
close
in class BufferedOutputStream
IOException
- if an I/O error occurs.FilterOutputStream.close()
public void write(int b) throws IOException
write
in class BufferedOutputStream
b
- 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 BufferedOutputStream
b
- 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
- IOException
protected void closeCurrentEntry() throws IOException
IOException
protected void pad() throws IOException
IOException