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

Quick Search    Search Deep

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

java.lang.Object
  extended byorg.media.mn8.util.tar.TarBuffer

public class TarBuffer
extends java.lang.Object

Version:
$Revision: 1.2 $ $Date: 2002/02/27 19:21:18 $

Field Summary
private  byte[] blkBuffer
           
private  int blkSize
           
private  int currBlkIdx
           
private  int currRecIdx
           
static int DEFAULT_BLKSIZE
           
static int DEFAULT_RCDSIZE
           
private  java.io.InputStream is
           
private  java.io.OutputStream os
           
private  int recperblk
           
private  int recSize
           
 
Constructor Summary
TarBuffer(java.io.InputStream is)
           
TarBuffer(java.io.OutputStream os)
           
 
Method Summary
 void close()
           
 int getBlockSize()
           
 int getRecordSize()
           
private  void initialize(int bsize, int rsize)
           
 boolean isEOFRecord(byte[] rec)
           
private  boolean readBlock()
           
 byte[] readRecord()
           
private  void writeBlock()
           
 void writeRecord(byte[] buffer)
           
 void writeRecord(byte[] buf, int offset)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_RCDSIZE

public static final int DEFAULT_RCDSIZE
See Also:
Constant Field Values

DEFAULT_BLKSIZE

public static final int DEFAULT_BLKSIZE
See Also:
Constant Field Values

is

private java.io.InputStream is

os

private java.io.OutputStream os

blkBuffer

private byte[] blkBuffer

currBlkIdx

private int currBlkIdx

currRecIdx

private int currRecIdx

blkSize

private int blkSize

recSize

private int recSize

recperblk

private int recperblk
Constructor Detail

TarBuffer

public TarBuffer(java.io.InputStream is)

TarBuffer

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

getRecordSize

public int getRecordSize()

getBlockSize

public int getBlockSize()

isEOFRecord

public boolean isEOFRecord(byte[] rec)

readRecord

public byte[] readRecord()
                  throws java.io.IOException

writeRecord

public void writeRecord(byte[] buffer)
                 throws java.io.IOException

writeRecord

public void writeRecord(byte[] buf,
                        int offset)
                 throws java.io.IOException

close

public void close()
           throws java.io.IOException

readBlock

private boolean readBlock()
                   throws java.io.IOException

writeBlock

private void writeBlock()
                 throws java.io.IOException

initialize

private void initialize(int bsize,
                        int rsize)