Remote Systems
v6.4.1

com.ibm.etools.systems.core.clientserver.util.tar
Class TarOutputStream

java.lang.Object
  extended byjava.io.OutputStream
      extended bycom.ibm.etools.systems.core.clientserver.util.tar.TarOutputStream
All Implemented Interfaces:
ITarConstants

public class TarOutputStream
extends OutputStream
implements ITarConstants

This class implements an output stream filter for writing files in the tar file format.


Field Summary
 
Fields inherited from interface com.ibm.etools.systems.core.clientserver.util.tar.ITarConstants
BLOCK_SIZE, CHKSUM_LENGTH, DEVMAJOR_LENGTH, DEVMINOR_LENGTH, GID_LENGTH, GNAME_LENGTH, HEADER_LENGTH, LINKNAME_LENGTH, MAGIC_LENGTH, MODE_LENGTH, MTIME_LENGTH, NAME_LENGTH, PREFIX_LENGTH, SEPARATOR_CHAR, SIZE_LENGTH, TF_BLOCK, TF_CHAR, TF_CONTIGUOUS, TF_DIR, TF_FIFO, TF_LINK, TF_NORMAL, TF_OLDNORMAL, TF_SYMLINK, TYPEFLAG_LENGTH, UID_LENGTH, UNAME_LENGTH, VERSION_LENGTH
 
Constructor Summary
TarOutputStream(OutputStream out)
          Creates a new tar output stream.
 
Method Summary
 void close()
           
 void closeEntry()
          Closes the current tar entry, and positions the stream for writing the next entry.
 void putNextEntry(TarEntry entry)
          Begins writing a new tar entry, and positions the stream to the start of the entry data.
 void write(int b)
           
 
Methods inherited from class java.io.OutputStream
flush, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TarOutputStream

public TarOutputStream(OutputStream out)
Creates a new tar output stream.

Parameters:
out - the actual output stream.
Method Detail

close

public void close()
           throws IOException
Throws:
IOException
See Also:
OutputStream.close()

write

public void write(int b)
           throws IOException
Throws:
IOException
See Also:
OutputStream.write(int)

putNextEntry

public void putNextEntry(TarEntry entry)
                  throws IOException
Begins writing a new tar entry, and positions the stream to the start of the entry data. Closes the current entry if still active.

Throws:
IOException - if an I/O occurs.

closeEntry

public void closeEntry()
                throws IOException
Closes the current tar entry, and positions the stream for writing the next entry.

Throws:
IOException - if an I/O error occurs.

Remote Systems
v6.4.1

Copyright © 2005 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.