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

java.lang.Object
  extended by uk.org.retep.util.io.tar.WritableTarChannel
All Implemented Interfaces:
java.io.Closeable, java.nio.channels.Channel, java.nio.channels.WritableByteChannel, WritableTar

public class WritableTarChannel
extends java.lang.Object
implements java.nio.channels.Channel, java.nio.channels.WritableByteChannel, WritableTar

A Channel for writing a Tar archive. This channel implementation will send the archive to an underlying WritableByteChannel.

Author:
peter

Constructor Summary
WritableTarChannel(java.nio.channels.WritableByteChannel channel)
           
 
Method Summary
 void close()
           
 void closeEntry()
          Close the current entry
 boolean isOpen()
           
 void putNextEntry(TarHeader header)
          Write the supplied TarHeader to the archive
 int write(java.nio.ByteBuffer src)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WritableTarChannel

public WritableTarChannel(java.nio.channels.WritableByteChannel channel)
Method Detail

isOpen

public boolean isOpen()
Specified by:
isOpen in interface java.nio.channels.Channel

close

public void close()
           throws java.io.IOException
Specified by:
close in interface java.io.Closeable
Specified by:
close in interface java.nio.channels.Channel
Throws:
java.io.IOException

write

public int write(java.nio.ByteBuffer src)
          throws java.io.IOException
Specified by:
write in interface java.nio.channels.WritableByteChannel
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
Description copied from interface: WritableTar
Close the current entry

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


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