TarArchiveOutputStream
instead@Deprecated public class TarOutputStream extends FilterOutputStream
Modifier and Type | Field and Description |
---|---|
protected byte[] |
assemBuf
Deprecated.
|
protected int |
assemLen
Deprecated.
|
protected org.apache.tools.tar.TarBuffer |
buffer
Deprecated.
|
protected long |
currBytes
Deprecated.
|
protected String |
currName
Deprecated.
|
protected long |
currSize
Deprecated.
|
protected boolean |
debug
Deprecated.
|
static int |
LONGFILE_ERROR
Deprecated.
Fail if a long file name is required in the archive.
|
static int |
LONGFILE_GNU
Deprecated.
GNU tar extensions are used to store long file names in the archive.
|
static int |
LONGFILE_TRUNCATE
Deprecated.
Long paths will be truncated in the archive.
|
protected int |
longFileMode
Deprecated.
|
protected byte[] |
oneBuf
Deprecated.
|
protected byte[] |
recordBuf
Deprecated.
|
out
Constructor and Description |
---|
TarOutputStream(OutputStream os)
Deprecated.
Constructor for TarInputStream.
|
TarOutputStream(OutputStream os,
int blockSize)
Deprecated.
Constructor for TarInputStream.
|
TarOutputStream(OutputStream os,
int blockSize,
int recordSize)
Deprecated.
Constructor for TarInputStream.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Deprecated.
Ends the TAR archive and closes the underlying OutputStream.
|
void |
closeEntry()
Deprecated.
Close an entry.
|
void |
finish()
Deprecated.
Ends the TAR archive without closing the underlying OutputStream.
|
int |
getRecordSize()
Deprecated.
Get the record size being used by this stream's TarBuffer.
|
void |
putNextEntry(org.apache.tools.tar.TarEntry entry)
Deprecated.
Put an entry on the output stream.
|
void |
setBufferDebug(boolean debug)
Deprecated.
Sets the debugging flag in this stream's TarBuffer.
|
void |
setDebug(boolean debugF)
Deprecated.
Sets the debugging flag.
|
void |
setLongFileMode(int longFileMode)
Deprecated.
Set the long file mode.
|
void |
write(byte[] wBuf)
Deprecated.
Writes bytes to the current tar archive entry.
|
void |
write(byte[] wBuf,
int wOffset,
int numToWrite)
Deprecated.
Writes bytes to the current tar archive entry.
|
void |
write(int b)
Deprecated.
Writes a byte to the current tar archive entry.
|
flush
public static final int LONGFILE_ERROR
public static final int LONGFILE_TRUNCATE
public static final int LONGFILE_GNU
protected boolean debug
protected long currSize
protected String currName
protected long currBytes
protected byte[] oneBuf
protected byte[] recordBuf
protected int assemLen
protected byte[] assemBuf
protected org.apache.tools.tar.TarBuffer buffer
protected int longFileMode
public TarOutputStream(OutputStream os)
os
- the output stream to usepublic TarOutputStream(OutputStream os, int blockSize)
os
- the output stream to useblockSize
- the block size to usepublic TarOutputStream(OutputStream os, int blockSize, int recordSize)
os
- the output stream to useblockSize
- the block size to userecordSize
- the record size to usepublic void setLongFileMode(int longFileMode)
longFileMode
- the mode to usepublic 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
IOException
- on errorpublic void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class FilterOutputStream
IOException
- on errorpublic int getRecordSize()
public void putNextEntry(org.apache.tools.tar.TarEntry entry) throws IOException
entry
- The TarEntry to be written to the archive.IOException
- on errorpublic void closeEntry() throws IOException
IOException
- on errorpublic void write(int b) throws IOException
write
in class FilterOutputStream
b
- The byte written.IOException
- on errorpublic void write(byte[] wBuf) throws IOException
write
in class FilterOutputStream
wBuf
- The buffer to write to the archive.IOException
- on errorpublic void write(byte[] wBuf, int wOffset, int numToWrite) throws IOException
write
in class FilterOutputStream
wBuf
- 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.IOException
- on errorCopyright © 2017. All rights reserved.