0
|
1 package jp.ac.u_ryukyu.ie.cr.jungle.persistent;
|
|
2
|
|
3 import java.io.FileNotFoundException;
|
|
4 import java.io.IOException;
|
|
5 import java.io.RandomAccessFile;
|
|
6
|
|
7 import jp.ac.u_ryukyu.ie.cr.jungle.util.Either;
|
|
8
|
|
9 public class DefaultJournalWriter
|
|
10 {
|
|
11 public DefaultJournalWriter(String _fileName)
|
|
12 {
|
|
13
|
|
14 }
|
|
15
|
|
16 public static Either<Error,DefaultJournalWriter> newInstance(String fileName)
|
|
17 {
|
|
18 RandomAccessFile journal = null;
|
|
19 try{
|
|
20 journal = new RandomAccessFile(fileName,"rw");
|
|
21 //FileChannel ch = journal.getChannel();
|
|
22 long length = journal.length();
|
|
23 }catch(FileNotFoundException e){
|
|
24
|
|
25 }catch(IOException e){
|
|
26
|
|
27 }
|
|
28
|
|
29 return null;
|
|
30 }
|
|
31 }
|