public class ByteArraySeekableSource extends BaseSeekableSource
SeekableSource with a max size of 2GB.| Constructor and Description |
|---|
ByteArraySeekableSource(byte[] bytes) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
long |
position() |
SeekableSource |
position(long position)
Sets the source position.
|
int |
read()
Reads a byte of data from this source.
|
int |
read(ByteBuffer dst) |
long |
size() |
SeekableSource |
view(long startingPosition,
long length) |
id, isOpen, requireOpenclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitasInputStream, back, back, forward, peek, peekBackpublic long position()
public SeekableSource position(long position)
SeekableSourceposition - a non-negative long for the new positionpublic long size()
public int read(ByteBuffer dst) throws IOException
IOExceptionpublic int read()
throws IOException
SeekableSource0x00-0xff ).-1 if there is no more data.IOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in interface Channelclose in class BaseSeekableSourceIOExceptionpublic SeekableSource view(long startingPosition, long length) throws IOException
SeekableSource. Reading from the view doesn't affect the SeekableSource position. Closing the
SeekableSource makes all the views unreadable but closing the view has no effect on the SeekableSource. A view may or may not work on a thread bound
copy of the SeekableSource so as a general rule it should not be created and handed to other threads..IOException - if something goes wrong while creating the viewCopyright © 2018 sejda. All rights reserved.