01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tc.io;
05:
06: import java.io.FileNotFoundException;
07: import java.io.RandomAccessFile;
08:
09: public class TCRandomFileAccessImpl implements TCRandomFileAccess {
10: private RandomAccessFile randomAccessFile;
11:
12: public TCRandomFileAccessImpl() {
13: randomAccessFile = null;
14: }
15:
16: public TCFileChannel getChannel(TCFile tcFile, String mode)
17: throws FileNotFoundException {
18: randomAccessFile = new RandomAccessFile(tcFile.getFile(), mode);
19: return new TCFileChannelImpl(randomAccessFile.getChannel());
20: }
21: }
|