01: /*
02: * Copyright 2004-2008 H2 Group. Licensed under the H2 License, Version 1.0
03: * (http://h2database.com/html/license.html).
04: * Initial Developer: H2 Group
05: */
06: package org.h2.store.fs;
07:
08: import java.io.FileNotFoundException;
09: import java.io.IOException;
10: import java.io.RandomAccessFile;
11:
12: import org.h2.util.FileUtils;
13:
14: /**
15: * This class is extends a java.io.RandomAccessFile.
16: */
17: public class FileObjectDisk extends RandomAccessFile implements
18: FileObject {
19:
20: public FileObjectDisk(String fileName, String mode)
21: throws FileNotFoundException {
22: super (fileName, mode);
23: }
24:
25: public void sync() throws IOException {
26: getFD().sync();
27: }
28:
29: public void setFileLength(long newLength) throws IOException {
30: FileUtils.setLength(this, newLength);
31: }
32:
33: }
|