com.ice.tar

Class TarGzOutputStream


public class TarGzOutputStream
extends TarOutputStream

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.
Author:
"Bay"

Field Summary

Fields inherited from class com.ice.tar.TarOutputStream

assemBuf, assemLen, buffer, currBytes, currSize, debug, oneBuf, recordBuf

Constructor Summary

TarGzOutputStream(OutputStream out)

Method Summary

void
close()
void
closeEntry()
void
finish()
int
getRecordSize()
void
putNextEntry(TarEntry entry)
void
setBufferDebug(boolean b)
void
setDebug(boolean b)
void
write(byte[] b)
void
write(byte[] b, int start, int length)
void
write(int b)

Methods inherited from class com.ice.tar.TarOutputStream

close, closeEntry, finish, getRecordSize, putNextEntry, setBufferDebug, setDebug, write, write, write

Constructor Details

TarGzOutputStream

public TarGzOutputStream(OutputStream out)
            throws IOException

Method Details

close

public void close()
            throws IOException
Overrides:
close in interface TarOutputStream

closeEntry

public void closeEntry()
            throws IOException
Overrides:
closeEntry in interface TarOutputStream

finish

public void finish()
            throws IOException
Overrides:
finish in interface TarOutputStream

getRecordSize

public int getRecordSize()
Overrides:
getRecordSize in interface TarOutputStream

putNextEntry

public void putNextEntry(TarEntry entry)
            throws IOException
Overrides:
putNextEntry in interface TarOutputStream

setBufferDebug

public void setBufferDebug(boolean b)
Overrides:
setBufferDebug in interface TarOutputStream

setDebug

public void setDebug(boolean b)
Overrides:
setDebug in interface TarOutputStream

write

public void write(byte[] b)
            throws IOException
Overrides:
write in interface TarOutputStream

write

public void write(byte[] b,
                  int start,
                  int length)
            throws IOException
Overrides:
write in interface TarOutputStream

write

public void write(int b)
            throws IOException
Overrides:
write in interface TarOutputStream

This software has been placed into the public domain.