1 21 22 package org.apache.derby.impl.io; 23 24 import org.apache.derby.iapi.services.sanity.SanityManager; 25 26 import org.apache.derby.io.StorageFactory; 27 import org.apache.derby.io.StorageFile; 28 29 import java.io.FileNotFoundException ; 30 import java.io.InputStream ; 31 import java.io.OutputStream ; 32 import java.io.IOException ; 33 34 import java.util.Properties ; 35 36 40 41 public class CPStorageFactory extends BaseStorageFactory 42 { 43 50 StorageFile newPersistentFile( String path) 51 { 52 return new CPFile( this, path); 53 } 54 55 63 StorageFile newPersistentFile( String directoryName, String fileName) 64 { 65 if( directoryName == null || directoryName.length() == 0) 66 return newPersistentFile( fileName); 67 return new CPFile( this, directoryName, fileName); 68 } 69 70 78 StorageFile newPersistentFile( StorageFile directoryName, String fileName) 79 { 80 if( directoryName == null) 81 return newPersistentFile( fileName); 82 return new CPFile( (CPFile) directoryName, fileName); 83 } 84 85 void doInit() throws IOException 86 { 87 if( dataDirectory != null) 88 { 89 separatedDataDirectory = dataDirectory + '/'; canonicalName = dataDirectory; 91 createTempDir(); 92 } 93 } } 95 | Popular Tags |