org.jimageanalyst.io
Class SeekableByteArrayInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by java.io.ByteArrayInputStream
          extended by org.jimageanalyst.io.SeekableByteArrayInputStream
All Implemented Interfaces:
java.io.Closeable

public class SeekableByteArrayInputStream
extends java.io.ByteArrayInputStream

ByteArrayInputStream that supports seeking.

Version:
$LastChangedRevision: 6 $
Author:
Oliver J. Siegmar

Field Summary
 
Fields inherited from class java.io.ByteArrayInputStream
buf, count, mark, pos
 
Constructor Summary
SeekableByteArrayInputStream(byte[] buf)
          Constructs a SeekableByteArrayInputStream with the specified buffer.
 
Method Summary
 void seek(int seekPos)
          Seeks to a specific position in the underlaying byte array.
 
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

SeekableByteArrayInputStream

public SeekableByteArrayInputStream(byte[] buf)
Constructs a SeekableByteArrayInputStream with the specified buffer.

Parameters:
buf - the input buffer
Method Detail

seek

public void seek(int seekPos)
Seeks to a specific position in the underlaying byte array.

Parameters:
seekPos - the position to seek to (0 based)


Copyright © 2006-2007. All Rights Reserved.