DataSource backed by a File
| Modifier and Type | Field and Description |
|---|---|
| private final IdentityHashMap | |
| private final FileChannel | |
| private Long | |
| private final boolean | |
| private static final Logger | |
| private final RandomAccessFile | |
| private final boolean |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | |
| public | |
| public | |
| private | FileBackedDataSource(RandomAccessFile srcFile, FileChannel channel, boolean readOnly, boolean closeChannelOnClose)
|
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Implements abstract org. Implements java. Closes this stream and releases any system resources associated with it. |
| public void | copyTo(OutputStream stream)
Implements abstract org. Copies the contents to the specified OutputStream |
| public FileChannel | |
| public boolean | |
| private static RandomAccessFile | |
| public ByteBuffer | |
| public void | |
| public long | |
| private static void | |
| public void |
| buffersToClean | back to summary |
|---|---|
| private final IdentityHashMap<ByteBuffer, ByteBuffer> buffersToClean | |
| channel | back to summary |
|---|---|
| private final FileChannel channel | |
| channelSize | back to summary |
|---|---|
| private Long channelSize | |
| closeChannelOnClose | back to summary |
|---|---|
| private final boolean closeChannelOnClose | |
| LOG | back to summary |
|---|---|
| private static final Logger LOG | |
| srcFile | back to summary |
|---|---|
| private final RandomAccessFile srcFile | |
| writable | back to summary |
|---|---|
| private final boolean writable | |
| FileBackedDataSource | back to summary |
|---|---|
| public FileBackedDataSource(File file) throws FileNotFoundException | |
| FileBackedDataSource | back to summary |
|---|---|
| public FileBackedDataSource(File file, boolean readOnly) throws FileNotFoundException | |
| FileBackedDataSource | back to summary |
|---|---|
| public FileBackedDataSource(RandomAccessFile srcFile, boolean readOnly) | |
| FileBackedDataSource | back to summary |
|---|---|
| public FileBackedDataSource(FileChannel channel, boolean readOnly) | |
| FileBackedDataSource | back to summary |
|---|---|
public FileBackedDataSource(FileChannel channel, boolean readOnly, boolean closeChannelOnClose)
| |
| FileBackedDataSource | back to summary |
|---|---|
| private FileBackedDataSource(RandomAccessFile srcFile, FileChannel channel, boolean readOnly, boolean closeChannelOnClose) | |
| close | back to summary |
|---|---|
| public void close() throws IOException Implements abstract org. Implements java. Doc from java. Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect. As noted in
| |
| copyTo | back to summary |
|---|---|
| public void copyTo(OutputStream stream) throws IOException Implements abstract org. Doc from org. Copies the contents to the specified OutputStream
| |
| getChannel | back to summary |
|---|---|
| public FileChannel getChannel() | |
| isWriteable | back to summary |
|---|---|
| public boolean isWriteable() | |
| newSrcFile | back to summary |
|---|---|
| private static RandomAccessFile newSrcFile(File file, String mode) throws FileNotFoundException | |
| read | back to summary |
|---|---|
| public ByteBuffer read(int length, long position) throws IOException Implements abstract org.
| |
| releaseBuffer | back to summary |
|---|---|
| public void releaseBuffer(ByteBuffer buffer) | |
| size | back to summary |
|---|---|
| public long size() throws IOException Implements abstract org.
| |
| unmap | back to summary |
|---|---|
| private static void unmap(final ByteBuffer buffer) | |
| write | back to summary |
|---|---|
| public void write(ByteBuffer src, long position) throws IOException Implements abstract org.
| |