Package com.itextpdf.io.source
Class RASInputStream
- java.lang.Object
-
- java.io.InputStream
-
- com.itextpdf.io.source.RASInputStream
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
public class RASInputStream extends java.io.InputStream
An input stream that uses aIRandomAccessSource
as its underlying source.
-
-
Field Summary
Fields Modifier and Type Field Description private long
position
The current position in the source.private IRandomAccessSource
source
The source.
-
Constructor Summary
Constructors Constructor Description RASInputStream(IRandomAccessSource source)
Creates an input stream based on the source.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IRandomAccessSource
getSource()
Gets the sourceint
read()
int
read(byte[] b, int off, int len)
-
-
-
Field Detail
-
source
private final IRandomAccessSource source
The source.
-
position
private long position
The current position in the source.
-
-
Constructor Detail
-
RASInputStream
public RASInputStream(IRandomAccessSource source)
Creates an input stream based on the source.- Parameters:
source
- The source.
-
-
Method Detail
-
getSource
public IRandomAccessSource getSource()
Gets the source- Returns:
- an instance of
IRandomAccessSource
-
read
public int read(byte[] b, int off, int len) throws java.io.IOException
- Overrides:
read
in classjava.io.InputStream
- Throws:
java.io.IOException
-
read
public int read() throws java.io.IOException
- Specified by:
read
in classjava.io.InputStream
- Throws:
java.io.IOException
-
-