us.ihmc.utilities.io
Class ResettableByteArrayInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by java.io.ByteArrayInputStream
          extended by us.ihmc.utilities.io.ResettableByteArrayInputStream
All Implemented Interfaces:
java.io.Closeable

public class ResettableByteArrayInputStream
extends java.io.ByteArrayInputStream


Constructor Summary
ResettableByteArrayInputStream()
           
ResettableByteArrayInputStream(byte[] buffer, int length)
           
ResettableByteArrayInputStream(byte[] buffer, int offset, int length)
           
 
Method Summary
 void close()
           
 byte[] getBytes()
           
 int getCount()
           
 void setBuffer(byte[] buffer, int length)
           
 
Methods inherited from class java.io.ByteArrayInputStream
available, mark, markSupported, read, read, reset, skip
 
Methods inherited from class java.io.InputStream
read
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResettableByteArrayInputStream

public ResettableByteArrayInputStream()

ResettableByteArrayInputStream

public ResettableByteArrayInputStream(byte[] buffer,
                                      int length)

ResettableByteArrayInputStream

public ResettableByteArrayInputStream(byte[] buffer,
                                      int offset,
                                      int length)
Method Detail

getBytes

public byte[] getBytes()

getCount

public int getCount()

close

public void close()
           throws java.io.IOException
Specified by:
close in interface java.io.Closeable
Overrides:
close in class java.io.ByteArrayInputStream
Throws:
java.io.IOException

setBuffer

public void setBuffer(byte[] buffer,
                      int length)