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