public class InternalInputStream extends SeekableStream
MAX_BUFFER_SIZE| Constructor and Description |
|---|
InternalInputStream(byte[] alreadyRead,
InputStream stream)
Constructor writes into temp file passed buffer, then passed stream.
|
InternalInputStream(InputStream fileStream) |
InternalInputStream(RandomAccessFile source)
Constructor that does not perform file copy.
|
InternalInputStream(String fileName) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
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() |
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, isEOF, readByte, seekFromCurrentPosition, seekFromEnd, unread, unreadavailable, mark, markSupported, read, read, skippublic InternalInputStream(RandomAccessFile source)
source - is random access filepublic InternalInputStream(String fileName) 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 close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class ASInputStreamIOExceptionpublic void reset()
throws IOException
reset in class ASInputStreamIOExceptionpublic boolean isCloneable()
public long getOffset()
throws IOException
SeekableStreamgetOffset in class SeekableStreamIOExceptionpublic void seek(long pos)
throws IOException
SeekableStreamseek in class SeekableStreampos - is offset of a byte to go to.IOExceptionpublic int peek()
throws IOException
SeekableStreampeek in class SeekableStreamIOExceptionpublic long getStreamLength()
throws IOException
SeekableStreamgetStreamLength in class SeekableStreamIOExceptionpublic RandomAccessFile getStream()
public ASInputStream getStream(long startOffset, long length)
SeekableStreamgetStream in class SeekableStreamstartOffset - is starting offset of substream.length - is length of substream.Copyright © 2015–2016 The veraPDF Consortium. All rights reserved.