|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.OutputStream
java.io.FilterOutputStream
com.ice.tar.TarOutputStream
com.ice.tar.TarGzOutputStream
public class TarGzOutputStream
Outputs tar.gz files. Added functionality that it doesn't need to know the size of an entry. If an entry has zero size when it is put in the Tar, then it buffers it until it's closed and it knows the size.
Field Summary |
---|
Fields inherited from class com.ice.tar.TarOutputStream |
---|
assemBuf, assemLen, buffer, currBytes, currSize, debug, oneBuf, recordBuf |
Fields inherited from class java.io.FilterOutputStream |
---|
out |
Constructor Summary | |
---|---|
TarGzOutputStream(java.io.OutputStream out)
|
Method Summary | |
---|---|
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 b)
Sets the debugging flag in this stream's TarBuffer. |
void |
setDebug(boolean b)
Sets the debugging flag. |
void |
write(byte[] b)
Writes bytes to the current tar archive entry. |
void |
write(byte[] b,
int start,
int length)
Writes bytes to the current tar archive entry. |
void |
write(int b)
Writes a byte to the current tar archive entry. |
Methods inherited from class java.io.FilterOutputStream |
---|
flush |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TarGzOutputStream(java.io.OutputStream out) throws java.io.IOException
java.io.IOException
Method Detail |
---|
public void setDebug(boolean b)
TarOutputStream
setDebug
in class TarOutputStream
b
- True to turn on debugging.public void setBufferDebug(boolean b)
TarOutputStream
setBufferDebug
in class TarOutputStream
public void finish() throws java.io.IOException
TarOutputStream
finish
in class TarOutputStream
java.io.IOException
public void close() throws java.io.IOException
TarOutputStream
close
in interface java.io.Closeable
close
in class TarOutputStream
java.io.IOException
public int getRecordSize()
TarOutputStream
getRecordSize
in class TarOutputStream
public void putNextEntry(TarEntry entry) throws java.io.IOException
TarOutputStream
putNextEntry
in class TarOutputStream
entry
- The TarEntry to be written to the archive.
java.io.IOException
public void closeEntry() throws java.io.IOException
TarOutputStream
closeEntry
in class TarOutputStream
java.io.IOException
public void write(int b) throws java.io.IOException
TarOutputStream
write
in class TarOutputStream
b
- The byte written.
java.io.IOException
public void write(byte[] b) throws java.io.IOException
TarOutputStream
write
in class TarOutputStream
b
- The buffer to write to the archive.
java.io.IOException
public void write(byte[] b, int start, int length) throws java.io.IOException
TarOutputStream
write
in class TarOutputStream
b
- The buffer to write to the archive.start
- The offset in the buffer from which to get bytes.length
- The number of bytes to write.
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |