public final class SeekableSources extends Object
SeekableSource based on the given input or to bridge SeekableSources to the more
traditional InputStream or other standard I/O classes.| Modifier and Type | Field and Description |
|---|---|
static String |
DISABLE_MEMORY_MAPPED_PROPERTY
Threshold size in bytes where the SeekableSources method will switch to
MemoryMappedSeekableSource.MemoryMappedSeekableSource(File) |
static String |
INPUT_BUFFER_SIZE_PROPERTY
Buffer size for
BufferedSeekableSource |
static String |
MAPPED_SIZE_THRESHOLD_PROPERTY
Threshold size in bytes where the SeekableSources method will switch to
MemoryMappedSeekableSource.MemoryMappedSeekableSource(File) |
static String |
MEMORY_MAPPED_PAGE_SIZE_PROPERTY
Size of the pages used by
MemoryMappedSeekableSource |
| Modifier and Type | Method and Description |
|---|---|
static SeekableSource |
inMemorySeekableSourceFrom(byte[] bytes)
Factory method to create a
SeekableSource from a byte array. |
static SeekableSource |
inMemorySeekableSourceFrom(InputStream stream)
Factory method to create a
SeekableSource from a InputStream. |
static SeekableSource |
onTempFileSeekableSourceFrom(InputStream stream)
Factory method to create a
SeekableSource from a InputStream. |
static SeekableSource |
seekableSourceFrom(File file)
Factory method to create a
SeekableSource from a File. |
public static final String MAPPED_SIZE_THRESHOLD_PROPERTY
MemoryMappedSeekableSource.MemoryMappedSeekableSource(File)public static final String DISABLE_MEMORY_MAPPED_PROPERTY
MemoryMappedSeekableSource.MemoryMappedSeekableSource(File)public static final String INPUT_BUFFER_SIZE_PROPERTY
BufferedSeekableSourcepublic static final String MEMORY_MAPPED_PAGE_SIZE_PROPERTY
MemoryMappedSeekableSourcepublic static SeekableSource seekableSourceFrom(File file) throws IOException
SeekableSource from a File. An attempt is made to return the best SeekableSource implementation based on the size of the
file and bitness of the JVM.file - SeekableSource from the given file.IOExceptionpublic static SeekableSource inMemorySeekableSourceFrom(InputStream stream) throws IOException
SeekableSource from a InputStream. The whole stream is read an stored in a byte array with a max size of 2GB.stream - SeekableSource from the given stream.IOExceptionpublic static SeekableSource inMemorySeekableSourceFrom(byte[] bytes)
SeekableSource from a byte array.bytes - SeekableSource wrapping the given byte array.public static SeekableSource onTempFileSeekableSourceFrom(InputStream stream) throws IOException
SeekableSource from a InputStream. The whole stream is copied to a temporary file.stream - SeekableSource from the given stream.IOExceptionCopyright © 2018 sejda. All rights reserved.