org.icepdf.core.io
Class RandomAccessFileInputStream
java.lang.Object
java.io.InputStream
org.icepdf.core.io.RandomAccessFileInputStream
- All Implemented Interfaces:
- java.io.Closeable, SeekableInput
public class RandomAccessFileInputStream
- extends java.io.InputStream
- implements SeekableInput
- Since:
- 2.0
- Author:
- Mark Collette
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RandomAccessFileInputStream
protected RandomAccessFileInputStream(java.io.RandomAccessFile raf)
build
public static RandomAccessFileInputStream build(java.io.File file)
throws java.io.FileNotFoundException
- Throws:
java.io.FileNotFoundException
read
public int read()
throws java.io.IOException
- Specified by:
read in interface SeekableInput- Specified by:
read in class java.io.InputStream
- Throws:
java.io.IOException
read
public int read(byte[] buffer)
throws java.io.IOException
- Specified by:
read in interface SeekableInput- 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
- Specified by:
read in interface SeekableInput- 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- Specified by:
close in interface SeekableInput- Overrides:
close in class java.io.InputStream
- Throws:
java.io.IOException
available
public int available()
- Specified by:
available in interface SeekableInput- Overrides:
available in class java.io.InputStream
mark
public void mark(int readLimit)
- Specified by:
mark in interface SeekableInput- Overrides:
mark in class java.io.InputStream
markSupported
public boolean markSupported()
- Specified by:
markSupported in interface SeekableInput- Overrides:
markSupported in class java.io.InputStream
reset
public void reset()
throws java.io.IOException
- Specified by:
reset in interface SeekableInput- Overrides:
reset in class java.io.InputStream
- Throws:
java.io.IOException
skip
public long skip(long n)
throws java.io.IOException
- Specified by:
skip in interface SeekableInput- Overrides:
skip in class java.io.InputStream
- Throws:
java.io.IOException
seekAbsolute
public void seekAbsolute(long absolutePosition)
throws java.io.IOException
- Specified by:
seekAbsolute in interface SeekableInput
- Throws:
java.io.IOException
seekRelative
public void seekRelative(long relativeOffset)
throws java.io.IOException
- Specified by:
seekRelative in interface SeekableInput
- Throws:
java.io.IOException
seekEnd
public void seekEnd()
throws java.io.IOException
- Specified by:
seekEnd in interface SeekableInput
- Throws:
java.io.IOException
getAbsolutePosition
public long getAbsolutePosition()
throws java.io.IOException
- Specified by:
getAbsolutePosition in interface SeekableInput
- Throws:
java.io.IOException
getLength
public long getLength()
throws java.io.IOException
- Specified by:
getLength in interface SeekableInput
- Throws:
java.io.IOException
getInputStream
public java.io.InputStream getInputStream()
- Specified by:
getInputStream in interface SeekableInput
beginThreadAccess
public void beginThreadAccess()
- Specified by:
beginThreadAccess in interface SeekableInput
endThreadAccess
public void endThreadAccess()
- Specified by:
endThreadAccess in interface SeekableInput