KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sleepycat > je > log > FileHandleSource


1 /*-
2  * See the file LICENSE for redistribution information.
3  *
4  * Copyright (c) 2002,2006 Oracle. All rights reserved.
5  *
6  * $Id: FileHandleSource.java,v 1.12 2006/10/30 21:14:20 bostic Exp $
7  */

8
9 package com.sleepycat.je.log;
10
11 import com.sleepycat.je.DatabaseException;
12
13 /**
14  * FileHandleSource is a file source built on top of a cached file handle.
15  */

16 class FileHandleSource extends FileSource {
17
18     private FileHandle fileHandle;
19
20     FileHandleSource(FileHandle fileHandle,
21              int readBufferSize,
22                      FileManager fileManager) {
23         super(fileHandle.getFile(), readBufferSize, fileManager);
24         this.fileHandle = fileHandle;
25     }
26
27     /**
28      * @see LogSource#release
29      */

30     public void release()
31         throws DatabaseException {
32
33         fileHandle.release();
34     }
35 }
36
Popular Tags