Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.media.mn8.util.tar
Class TarOutputStream  view TarOutputStream download TarOutputStream.java

java.lang.Object
  extended byjava.io.OutputStream
      extended byjava.io.FilterOutputStream
          extended byorg.media.mn8.util.tar.TarOutputStream

public class TarOutputStream
extends java.io.FilterOutputStream

Version:
$Revision: 1.1 $ $Date: 2002/02/27 19:14:23 $

Field Summary
protected  TarBuffer buffer
           
protected  int currByte
           
protected  int currSize
           
protected  byte[] oneBuf
           
protected  byte[] recordBuf
           
protected  byte[] tempBuf
           
protected  int tempLen
           
 
Fields inherited from class java.io.FilterOutputStream
out
 
Constructor Summary
TarOutputStream(java.io.OutputStream os)
           
 
Method Summary
 void close()
          This method closes the underlying OutputStream.
 void closeEntry()
           
 int getRecordSize()
           
 void putNextEntry(TarEntry te)
           
 void write(byte[] buf)
          This method writes all the bytes in the specified array to the underlying OutputStream.
 void write(byte[] buf, int offset, int length)
          This method calls the write(int) method len times for all bytes from the array buf starting at index offset.
 void write(int b)
          This method writes a single byte of output to the underlying OutputStream.
private  void writeEOFRecord()
           
 
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
 

Field Detail

buffer

protected TarBuffer buffer

recordBuf

protected byte[] recordBuf

oneBuf

protected byte[] oneBuf

currByte

protected int currByte

currSize

protected int currSize

tempLen

protected int tempLen

tempBuf

protected byte[] tempBuf
Constructor Detail

TarOutputStream

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

getRecordSize

public int getRecordSize()

close

public void close()
           throws java.io.IOException
Description copied from class: java.io.FilterOutputStream
This method closes the underlying OutputStream. Any further attempts to write to this stream may throw an exception.


write

public void write(int b)
           throws java.io.IOException
Description copied from class: java.io.FilterOutputStream
This method writes a single byte of output to the underlying OutputStream.


write

public void write(byte[] buf)
           throws java.io.IOException
Description copied from class: java.io.FilterOutputStream
This method writes all the bytes in the specified array to the underlying OutputStream. It does this by calling the three parameter version of this method - write(byte[], int, int) in this class instead of writing to the underlying OutputStream directly. This allows most subclasses to avoid overriding this method.


write

public void write(byte[] buf,
                  int offset,
                  int length)
           throws java.io.IOException
Description copied from class: java.io.FilterOutputStream
This method calls the write(int) method len times for all bytes from the array buf starting at index offset. Subclasses should overwrite this method to get a more efficient implementation.


putNextEntry

public void putNextEntry(TarEntry te)
                  throws java.io.IOException

closeEntry

public void closeEntry()
                throws java.io.IOException

writeEOFRecord

private void writeEOFRecord()
                     throws java.io.IOException