public class TarOutputStream
extends java.io.OutputStream
Constructor and Description |
---|
TarOutputStream(java.io.File fout) |
TarOutputStream(java.io.File fout,
boolean append)
Opens a file for writing.
|
TarOutputStream(java.io.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
|
public TarOutputStream(java.io.OutputStream out)
public TarOutputStream(java.io.File fout) throws java.io.FileNotFoundException
java.io.FileNotFoundException
public TarOutputStream(java.io.File fout, boolean append) throws java.io.IOException
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.OutputStream
java.io.IOException
FilterOutputStream.close()
public void write(int b) throws java.io.IOException
write
in class java.io.OutputStream
java.io.IOException
FilterOutputStream.write(int)
public void write(byte[] b, int off, int len) throws java.io.IOException
write
in class java.io.OutputStream
java.io.IOException
FilterOutputStream.write(byte[], int, int)
public void putNextEntry(TarEntry entry) throws java.io.IOException
java.io.IOException
protected void closeCurrentEntry() throws java.io.IOException
java.io.IOException
protected void pad() throws java.io.IOException
java.io.IOException