public class InternalInputStream extends SeekableInputStream
MAX_BUFFER_SIZEnPos, 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,
int numOfFileUsers) |
InternalInputStream(InputStream fileStream) |
InternalInputStream(String fileName) |
InternalInputStream(String fileName,
int numOfFileUsers) |
| Modifier and Type | Method and Description |
|---|---|
void |
closeResource() |
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 |
isClosed() |
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) |
getSeekableStream, incrementResourceUsers, isEOF, readByte, seekFromCurrentPosition, seekFromEnd, unread, unreadclose, createStreamFromStreamavailable, mark, markSupported, read, read, skippublic InternalInputStream(File file) 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(InputStream fileStream) throws IOException
IOExceptionpublic 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
closeResource 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 isClosed()
Copyright © 2015–2017 The veraPDF Consortium. All rights reserved.