1 4 package com.tc.io; 5 6 import java.io.FileNotFoundException ; 7 import java.io.RandomAccessFile ; 8 9 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) throws FileNotFoundException { 17 randomAccessFile = new RandomAccessFile (tcFile.getFile(), mode); 18 return new TCFileChannelImpl(randomAccessFile.getChannel()); 19 } 20 } 21 | Popular Tags |