org.sourcejammer.server.make
Class ByteArrayBuffer

java.lang.Object
  |
  +--org.sourcejammer.server.make.ByteArrayBuffer

public class ByteArrayBuffer
extends java.lang.Object


Field Summary
private  byte[] buffer
           
private  int bufferBeginIndex
           
private  int bufferEndIndex
           
private  int maxSize
           
private  java.io.FileInputStream stmIn
           
 
Constructor Summary
ByteArrayBuffer(java.io.FileInputStream stmIn, int maxSize)
           
 
Method Summary
 int beginIndex()
           
 int bufferIndexToSourceIndex(int index)
           
 void close()
           
 int endIndex()
           
protected  void finalize()
           
 byte[] getBuffer()
           
private  byte[] getNewBuffer(int numBytesToKeep, byte[] newBytes)
           
 void readUpTo(int upToIndex)
           
 int sourceIndexToBufferIndex(int index)
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

buffer

private byte[] buffer

stmIn

private java.io.FileInputStream stmIn

bufferBeginIndex

private int bufferBeginIndex

bufferEndIndex

private int bufferEndIndex

maxSize

private int maxSize
Constructor Detail

ByteArrayBuffer

public ByteArrayBuffer(java.io.FileInputStream stmIn,
                       int maxSize)
                throws java.io.IOException
Method Detail

readUpTo

public void readUpTo(int upToIndex)
              throws java.io.IOException
java.io.IOException

sourceIndexToBufferIndex

public int sourceIndexToBufferIndex(int index)

bufferIndexToSourceIndex

public int bufferIndexToSourceIndex(int index)

getBuffer

public byte[] getBuffer()

beginIndex

public int beginIndex()

endIndex

public int endIndex()

finalize

protected void finalize()
                 throws java.lang.Throwable
Overrides:
finalize in class java.lang.Object
java.lang.Throwable

close

public void close()
           throws java.io.IOException
java.io.IOException

getNewBuffer

private byte[] getNewBuffer(int numBytesToKeep,
                            byte[] newBytes)
                     throws java.io.IOException
java.io.IOException


Copyright 2003 Soucejammer project.