org.icepdf.core.io
Class SeekableInputConstrainedWrapper

java.lang.Object
  extended by java.io.InputStream
      extended by org.icepdf.core.io.SeekableInputConstrainedWrapper
All Implemented Interfaces:
java.io.Closeable

public class SeekableInputConstrainedWrapper
extends java.io.InputStream

Since:
2.0
Author:
Mark Collette

Constructor Summary
SeekableInputConstrainedWrapper(SeekableInput in, long offset, long length, boolean takeOwnership)
           
 
Method Summary
 int available()
           
 void beginThreadAccess()
           
 void close()
           
 void dispose()
           
 void endThreadAccess()
           
 long getAbsolutePosition()
           
 java.io.InputStream getInputStream()
           
 long getLength()
           
 void mark(int readLimit)
           
 boolean markSupported()
           
 void prepareForCurrentUse()
           
 int read()
           
 int read(byte[] buffer)
           
 int read(byte[] buffer, int offset, int length)
           
 void reset()
           
 void seekAbsolute(long absolutePosition)
           
 void seekEnd()
           
 void seekRelative(long relativeOffset)
           
 long skip(long n)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SeekableInputConstrainedWrapper

public SeekableInputConstrainedWrapper(SeekableInput in,
                                       long offset,
                                       long length,
                                       boolean takeOwnership)
Method Detail

prepareForCurrentUse

public void prepareForCurrentUse()

dispose

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

read

public int read()
         throws java.io.IOException
Specified by:
read in class java.io.InputStream
Throws:
java.io.IOException

read

public int read(byte[] buffer)
         throws java.io.IOException
Overrides:
read in class java.io.InputStream
Throws:
java.io.IOException

read

public int read(byte[] buffer,
                int offset,
                int length)
         throws java.io.IOException
Overrides:
read in class java.io.InputStream
Throws:
java.io.IOException

close

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

available

public int available()
Overrides:
available in class java.io.InputStream

mark

public void mark(int readLimit)
Overrides:
mark in class java.io.InputStream

markSupported

public boolean markSupported()
Overrides:
markSupported in class java.io.InputStream

reset

public void reset()
           throws java.io.IOException
Overrides:
reset in class java.io.InputStream
Throws:
java.io.IOException

skip

public long skip(long n)
          throws java.io.IOException
Overrides:
skip in class java.io.InputStream
Throws:
java.io.IOException

seekAbsolute

public void seekAbsolute(long absolutePosition)
                  throws java.io.IOException
Throws:
java.io.IOException

seekRelative

public void seekRelative(long relativeOffset)
                  throws java.io.IOException
Throws:
java.io.IOException

seekEnd

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

getAbsolutePosition

public long getAbsolutePosition()
                         throws java.io.IOException
Throws:
java.io.IOException

getLength

public long getLength()

getInputStream

public java.io.InputStream getInputStream()

beginThreadAccess

public void beginThreadAccess()

endThreadAccess

public void endThreadAccess()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object