public class ASFileInStream extends ASInputStream
isClosed, isSourceClosed, resourceUsers| Constructor and Description |
|---|
ASFileInStream(RandomAccessFile stream,
long offset,
long size,
IntReference numOfFileUsers,
String filePath,
boolean isTempFile)
Creates ASFileInStream that is a substream of RandomAccessFile stream.
|
| Modifier and Type | Method and Description |
|---|---|
void |
closeResource()
Closes stream resource.
|
void |
decrementResourceUsers()
Method decrements number of resource users.
|
String |
getFilePath() |
void |
incrementResourceUsers()
Method increments number of resource users.
|
int |
read() |
int |
read(byte[] buffer,
int sizeToRead) |
void |
reset() |
int |
skip(int size) |
close, createStreamFromStreamavailable, mark, markSupported, read, read, skippublic ASFileInStream(RandomAccessFile stream, long offset, long size, IntReference numOfFileUsers, String filePath, boolean isTempFile)
stream - is file stream.offset - is the offset ot the beginning of data.size - is the length of data chunk.numOfFileUsers - is amount of streams that use the passed
RandomAccessFile as a resource. It helps to
determine when the file stream should be closed.filePath - is the path to file that is a resource for stream.isTempFile - is true if the resource file is a temporary file and
should be deleted when closing resource.public int read()
throws IOException
read in class ASInputStreamIOExceptionpublic int read(byte[] buffer,
int sizeToRead)
throws IOException
read in class ASInputStreamIOExceptionpublic int skip(int size)
throws IOException
skip in class ASInputStreamIOExceptionpublic void closeResource()
throws IOException
ASInputStreamcloseResource in class ASInputStreamIOExceptionpublic void incrementResourceUsers()
ASInputStreamcloseResourceincrementResourceUsers in class ASInputStreampublic void decrementResourceUsers()
ASInputStreamcloseResourcedecrementResourceUsers in class ASInputStreampublic void reset()
reset in class ASInputStreampublic String getFilePath()
Copyright © 2015–2019 The veraPDF Consortium. All rights reserved.