com.imagero.uio.io
Class RandomAccessInputStream

java.lang.Object
  extended byjava.io.InputStream
      extended bycom.imagero.uio.io.RandomAccessInputStream
Direct Known Subclasses:
TIFFStripInputStream

public class RandomAccessInputStream
extends java.io.InputStream

same as FilterInputStream but with RandomAccess


Field Summary
protected  long mark
           
protected static long MARK_UNDEFINED
           
protected  long pos
           
protected  RandomAccessRO ro
           
protected  long startPos
           
 
Constructor Summary
RandomAccessInputStream(RandomAccessRO ro)
           
RandomAccessInputStream(RandomAccessRO ro, long startPos)
           
 
Method Summary
 int available()
           
protected  void checkPos()
           
 void close()
          releases reference to RandomAccessRO, but does not closes it
 void mark(int i)
           
 boolean markSupported()
           
 int read()
           
 int read(byte[] b)
           
 int read(byte[] b, int off, int len)
           
 void reset()
           
 long skip(long l)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MARK_UNDEFINED

protected static long MARK_UNDEFINED

ro

protected RandomAccessRO ro

pos

protected long pos

mark

protected long mark

startPos

protected long startPos
Constructor Detail

RandomAccessInputStream

public RandomAccessInputStream(RandomAccessRO ro)

RandomAccessInputStream

public RandomAccessInputStream(RandomAccessRO ro,
                               long startPos)
Method Detail

read

public int read()
         throws java.io.IOException
Throws:
java.io.IOException

read

public int read(byte[] b)
         throws java.io.IOException
Throws:
java.io.IOException

read

public int read(byte[] b,
                int off,
                int len)
         throws java.io.IOException
Throws:
java.io.IOException

checkPos

protected void checkPos()
                 throws java.io.IOException
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
releases reference to RandomAccessRO, but does not closes it

Throws:
java.io.IOException

available

public int available()
              throws java.io.IOException
Throws:
java.io.IOException

markSupported

public boolean markSupported()

mark

public void mark(int i)

reset

public void reset()
           throws java.io.IOException
Throws:
java.io.IOException

skip

public long skip(long l)
          throws java.io.IOException
Throws:
java.io.IOException