com.karmasphere.share.util
Class ByteArrayInputBuffer

java.lang.Object
  extended by java.io.InputStream
      extended by java.io.ByteArrayInputStream
          extended by com.karmasphere.share.util.ByteArrayInputBuffer
All Implemented Interfaces:
Closeable

public final class ByteArrayInputBuffer
extends ByteArrayInputStream

Add functionality to java.io.ByteArrayInputStream which is missing.


Field Summary
 
Fields inherited from class java.io.ByteArrayInputStream
buf, count, mark, pos
 
Constructor Summary
ByteArrayInputBuffer()
          Create a new ByteArrayInputBuffer with an empty buffer
ByteArrayInputBuffer(byte[] data)
          Create a new ByteArrayInputBuffer with the specified buffer.
 
Method Summary
 void reload(byte[] data)
          Reset this ByteArrayInputBuffer's buffer to the data provided
 
Methods inherited from class java.io.ByteArrayInputStream
available, close, mark, markSupported, read, read, reset, skip
 
Methods inherited from class java.io.InputStream
read
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ByteArrayInputBuffer

public ByteArrayInputBuffer()
Create a new ByteArrayInputBuffer with an empty buffer


ByteArrayInputBuffer

public ByteArrayInputBuffer(byte[] data)
Create a new ByteArrayInputBuffer with the specified buffer.

Method Detail

reload

public void reload(byte[] data)
Reset this ByteArrayInputBuffer's buffer to the data provided



Copyright © 2004-2005 Karamsphere. All Rights Reserved.