public abstract class DataSources extends Object
DataSource
abstraction.Modifier and Type | Method and Description |
---|---|
static DataSource |
asDataSource(ByteBuffer buffer)
Returns a
DataSource backed by the provided ByteBuffer . |
static DataSource |
asDataSource(RandomAccessFile file)
Returns a
DataSource backed by the provided RandomAccessFile . |
static DataSource |
asDataSource(RandomAccessFile file,
long offset,
long size)
Returns a
DataSource backed by the provided region of the RandomAccessFile . |
public static DataSource asDataSource(ByteBuffer buffer)
DataSource
backed by the provided ByteBuffer
. The data source
represents the data contained between the position and limit of the buffer. Changes to the
buffer's contents will be visible in the data source.public static DataSource asDataSource(RandomAccessFile file)
DataSource
backed by the provided RandomAccessFile
. Changes to the
file, including changes to size of file, will be visible in the data source.public static DataSource asDataSource(RandomAccessFile file, long offset, long size)
DataSource
backed by the provided region of the RandomAccessFile
.
Changes to the file will be visible in the data source.Copyright © 2016. All rights reserved.