1 21 22 package org.apache.derby.impl.io; 23 24 import java.io.File ; 25 import java.io.FileNotFoundException ; 26 import java.io.IOException ; 27 import java.io.SyncFailedException ; 28 import java.nio.channels.ClosedChannelException ; 29 30 37 class DirRandomAccessFile4 extends DirRandomAccessFile 38 { 39 40 41 55 DirRandomAccessFile4( File name, String mode) throws FileNotFoundException 56 { 57 super( name, mode); 58 } 59 60 69 public void sync( boolean metaData) throws IOException 70 { 71 try 72 { 73 getChannel().force( metaData); 74 } 75 catch( ClosedChannelException cce) { throw cce;} 76 catch( IOException ioe) 77 { 78 SyncFailedException sne = new SyncFailedException ( ioe.getMessage()); 79 sne.initCause( ioe); 80 throw sne; 81 } 82 } } 84 | Popular Tags |