uk.org.retep.util.io.tar
Class TarOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.FilterOutputStream
          extended by uk.org.retep.util.io.tar.TarOutputStream
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable, WritableTar

public class TarOutputStream
extends java.io.FilterOutputStream
implements WritableTar

An OutputStream to write a tar archive.

Author:
peter

Field Summary
 
Fields inherited from class java.io.FilterOutputStream
out
 
Constructor Summary
TarOutputStream(java.io.OutputStream out)
           
 
Method Summary
 void close()
          
 void closeEntry()
          Close the current entry
 void putNextEntry(TarHeader header)
          Write the supplied TarHeader to the archive
 void write(byte[] b)
          
 void write(byte[] b, int off, int len)
          
protected  void write(java.nio.ByteBuffer buffer)
           
 void write(int b)
          
 
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

TarOutputStream

public TarOutputStream(java.io.OutputStream out)
Method Detail

write

protected final void write(java.nio.ByteBuffer buffer)
                    throws java.io.IOException
Throws:
java.io.IOException

putNextEntry

public void putNextEntry(TarHeader header)
                  throws java.io.IOException
Write the supplied TarHeader to the archive

Specified by:
putNextEntry in interface WritableTar
Throws:
java.io.IOException

closeEntry

public void closeEntry()
                throws java.io.IOException
Close the current entry

Specified by:
closeEntry in interface WritableTar
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException

Specified by:
close in interface java.io.Closeable
Overrides:
close in class java.io.FilterOutputStream
Throws:
java.io.IOException

write

public void write(byte[] b)
           throws java.io.IOException

Overrides:
write in class java.io.FilterOutputStream
Throws:
java.io.IOException

write

public void write(byte[] b,
                  int off,
                  int len)
           throws java.io.IOException

Overrides:
write in class java.io.FilterOutputStream
Throws:
java.io.IOException

write

public void write(int b)
           throws java.io.IOException

Overrides:
write in class java.io.FilterOutputStream
Throws:
java.io.IOException


Copyright © 1998-2010 Retep Development Group. All Rights Reserved.