public class FileBackedDataSource extends DataSource
DataSource
backed by a FileConstructor and Description |
---|
FileBackedDataSource(File file) |
FileBackedDataSource(FileChannel channel) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the underlying stream
|
void |
copyTo(OutputStream stream)
Copies the contents to the specified OutputStream
|
ByteBuffer |
read(int length,
long position) |
long |
size() |
void |
write(ByteBuffer src,
long position) |
public FileBackedDataSource(File file) throws FileNotFoundException
FileNotFoundException
public FileBackedDataSource(FileChannel channel)
public ByteBuffer read(int length, long position) throws IOException
read
in class DataSource
IOException
public void write(ByteBuffer src, long position) throws IOException
write
in class DataSource
IOException
public void copyTo(OutputStream stream) throws IOException
DataSource
copyTo
in class DataSource
IOException
public long size() throws IOException
size
in class DataSource
IOException
public void close() throws IOException
DataSource
close
in class DataSource
IOException
Copyright © 2020. All rights reserved.