public class InternalInputStream extends SeekableInputStream
isClosed, isSourceClosed, resourceUsers| Constructor and Description |
|---|
InternalInputStream(byte[] alreadyRead,
InputStream stream)
Constructor writes into temp file passed buffer, then passed stream.
|
InternalInputStream(File file) |
InternalInputStream(File file,
boolean isTempFile) |
InternalInputStream(File file,
int numOfFileUsers) |
InternalInputStream(String fileName) |
InternalInputStream(String fileName,
int numOfFileUsers) |
| Modifier and Type | Method and Description |
|---|---|
void |
closeResource()
Closes stream resource.
|
String |
getFileName() |
long |
getOffset()
Gets offset of current byte.
|
RandomAccessFile |
getStream() |
ASInputStream |
getStream(long startOffset,
long length)
Gets substream of this stream that starts at given offset and has given
length.
|
long |
getStreamLength()
Gets total length of stream.
|
boolean |
isCloneable() |
boolean |
isSourceClosed() |
int |
peek()
Gets next byte without reading it.
|
int |
read() |
int |
read(byte[] buffer,
int size) |
void |
reset() |
void |
seek(long pos)
Goes to a particular byte in stream.
|
int |
skip(int size) |
decrementResourceUsers, getSeekableStream, incrementResourceUsers, isEOF, readByte, seekFromCurrentPosition, seekFromEnd, unread, unreadclose, createStreamFromStreamavailable, mark, markSupported, read, read, skippublic InternalInputStream(File file) throws FileNotFoundException
FileNotFoundExceptionpublic InternalInputStream(File file, boolean isTempFile) throws FileNotFoundException
FileNotFoundExceptionpublic InternalInputStream(File file, int numOfFileUsers) throws FileNotFoundException
FileNotFoundExceptionpublic InternalInputStream(String fileName) throws FileNotFoundException
FileNotFoundExceptionpublic InternalInputStream(String fileName, int numOfFileUsers) throws FileNotFoundException
FileNotFoundExceptionpublic InternalInputStream(byte[] alreadyRead,
InputStream stream)
throws IOException
alreadyRead - is byte array of data that was already read from the
beginning of stream.stream - is data left in stream.IOExceptionpublic int read()
throws IOException
read in class ASInputStreamIOExceptionpublic int read(byte[] buffer,
int size)
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 reset()
throws IOException
reset in class ASInputStreamIOExceptionpublic boolean isCloneable()
public long getOffset()
throws IOException
SeekableInputStreamgetOffset in class SeekableInputStreamIOExceptionpublic void seek(long pos)
throws IOException
SeekableInputStreamseek in class SeekableInputStreampos - is offset of a byte to go to.IOExceptionpublic int peek()
throws IOException
SeekableInputStreampeek in class SeekableInputStreamIOExceptionpublic long getStreamLength()
throws IOException
SeekableInputStreamgetStreamLength in class SeekableInputStreamIOExceptionpublic String getFileName()
public RandomAccessFile getStream()
public ASInputStream getStream(long startOffset, long length)
SeekableInputStreamgetStream in class SeekableInputStreamstartOffset - is starting offset of substream.length - is length of substream.public boolean isSourceClosed()
Copyright © 2015–2017 The veraPDF Consortium. All rights reserved.