1 21 22 package org.apache.derby.io; 23 24 import java.io.InputStream ; 25 import java.io.OutputStream ; 26 import java.io.FileNotFoundException ; 27 import java.io.IOException ; 28 import java.net.URL ; 29 import java.net.MalformedURLException ; 30 31 49 public interface StorageFile 50 { 51 52 public static final int NO_FILE_LOCK_SUPPORT = 0; 54 public static final int EXCLUSIVE_FILE_LOCK = 1; 55 public static final int EXCLUSIVE_FILE_LOCK_NOT_AVAILABLE = 2; 56 57 67 public String [] list(); 68 69 74 public boolean canWrite(); 75 76 81 public boolean exists(); 82 83 89 public boolean isDirectory(); 90 91 96 public boolean delete(); 97 98 103 public boolean deleteAll(); 104 105 117 public String getPath(); 118 119 126 public String getCanonicalPath() throws IOException ; 127 128 131 public String getName(); 132 133 139 public URL getURL() throws MalformedURLException ; 140 141 154 public boolean createNewFile() throws IOException ; 155 156 168 public boolean renameTo( StorageFile newName); 169 170 175 public boolean mkdir(); 176 177 182 public boolean mkdirs(); 183 184 191 public long length(); 192 193 199 public StorageFile getParentDir(); 200 201 208 public boolean setReadOnly(); 209 210 220 public OutputStream getOutputStream( ) throws FileNotFoundException ; 221 222 235 public OutputStream getOutputStream( boolean append) throws FileNotFoundException ; 236 237 244 public InputStream getInputStream( ) throws FileNotFoundException ; 245 246 254 public int getExclusiveFileLock(); 255 256 261 public void releaseExclusiveFileLock(); 262 263 290 public StorageRandomAccessFile getRandomAccessFile( String mode) throws FileNotFoundException ; 291 } 292 | Popular Tags |