Java Doc for DirFile.java in  » Database-DBMS » db-derby-10.2 » org » apache » derby » impl » io » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database DBMS » db derby 10.2 » org.apache.derby.impl.io 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.io.File
      org.apache.derby.impl.io.DirFile

All known Subclasses:   org.apache.derby.impl.io.DirFile4,
DirFile
class DirFile extends File implements StorageFile(Code)
This class provides a disk based implementation of the StorageFile interface. It is used by the database engine to access persistent data and transaction logs under the directory (default) subsubprotocol.



Constructor Summary
 DirFile(String path)
     Construct a DirFile from a path name.
 DirFile(String directoryName, String fileName)
     Construct a DirFile from a directory name and a file name.
 DirFile(DirFile directoryName, String fileName)
     Construct a DirFile from a directory name and a file name.

Method Summary
public  booleandeleteAll()
     Deletes the named file and, if it is a directory, all the files and directories it contains.
public synchronized  intgetExclusiveFileLock()
     Get an exclusive lock.
public  InputStreamgetInputStream()
     Creates an input stream from a file name.
public  OutputStreamgetOutputStream()
     Creates an output stream from a file name.
public  OutputStreamgetOutputStream(boolean append)
     Creates an output stream from a file name.
Parameters:
  append - If true then data will be appended to the end of the file, if it already exists.If false and a normal file already exists with this name the file will first be truncatedto zero length.
public  StorageFilegetParentDir()
     Get the name of the parent directory if this name includes a parent.
public  StorageRandomAccessFilegetRandomAccessFile(String mode)
     Get a random access (read/write) file.
Parameters:
  mode - "r", "rw", "rws", or "rwd".
static  StorageFilegetTempDir()
     Get the name of the directory of temporary files.
public  URLgetURL()
    
public synchronized  voidreleaseExclusiveFileLock()
    
public  booleanrenameTo(StorageFile newName)
     Rename the file denoted by this name.


Constructor Detail
DirFile
DirFile(String path)(Code)
Construct a DirFile from a path name.
Parameters:
  path - The path name.



DirFile
DirFile(String directoryName, String fileName)(Code)
Construct a DirFile from a directory name and a file name.
Parameters:
  directoryName - The directory part of the path name.
Parameters:
  fileName - The name of the file within the directory.



DirFile
DirFile(DirFile directoryName, String fileName)(Code)
Construct a DirFile from a directory name and a file name.
Parameters:
  directoryName - The directory part of the path name.
Parameters:
  fileName - The name of the file within the directory.




Method Detail
deleteAll
public boolean deleteAll()(Code)
Deletes the named file and, if it is a directory, all the files and directories it contains. true if the named file or directory is successfully deleted, false if not



getExclusiveFileLock
public synchronized int getExclusiveFileLock()(Code)
Get an exclusive lock. This is used to ensure that two or more JVMs do not open the same database at the same time. EXCLUSIVE_FILE_LOCK_NOT_AVAILABLE if the lock cannot be acquired because it is already held.
EXCLUSIVE_FILE_LOCK if the lock was successfully acquired.
NO_FILE_LOCK_SUPPORT if the system does not support exclusive locks.



getInputStream
public InputStream getInputStream() throws FileNotFoundException(Code)
Creates an input stream from a file name. an input stream suitable for reading from the file.
exception:
  FileNotFoundException - if the file is not found.



getOutputStream
public OutputStream getOutputStream() throws FileNotFoundException(Code)
Creates an output stream from a file name. an output stream suitable for writing to the file.
exception:
  FileNotFoundException - if the file exists but is a directoryrather than a regular file, does not exist but cannot be created, orcannot be opened for any other reason.



getOutputStream
public OutputStream getOutputStream(boolean append) throws FileNotFoundException(Code)
Creates an output stream from a file name.
Parameters:
  append - If true then data will be appended to the end of the file, if it already exists.If false and a normal file already exists with this name the file will first be truncatedto zero length. an output stream suitable for writing to the file.
exception:
  FileNotFoundException - if the file exists but is a directoryrather than a regular file, does not exist but cannot be created, orcannot be opened for any other reason.



getParentDir
public StorageFile getParentDir()(Code)
Get the name of the parent directory if this name includes a parent. An StorageFile denoting the parent directory of this StorageFile, if it has a parent, null ifit does not have a parent.



getRandomAccessFile
public StorageRandomAccessFile getRandomAccessFile(String mode) throws FileNotFoundException(Code)
Get a random access (read/write) file.
Parameters:
  mode - "r", "rw", "rws", or "rwd". The "rws" and "rwd" modes specifythat the data is to be written to persistent store, consistent with thejava.io.RandomAccessFile class ("synchronized" with the persistentstorage, in the file system meaning of the word "synchronized"). Howeverthe implementation is not required to implement the "rws" or "rwd"modes. The implementation may treat "rws" and "rwd" as "rw". It is up tothe user of this interface to call the StorageRandomAccessFile.syncmethod. If the "rws" or "rwd" modes are supported and theRandomAccessFile was opened in "rws" or "rwd" mode then theimplementation of StorageRandomAccessFile.sync need not do anything. an object that can be used for random access to the file.
exception:
  IllegalArgumentException - if the mode argument is not equal to one of "r", "rw".
exception:
  FileNotFoundException - if the file exists but is a directory rather than a regularfile, or cannot be opened or created for any other reason .



getTempDir
static StorageFile getTempDir() throws IOException(Code)
Get the name of the directory of temporary files. The abstract name of the temp directory;



getURL
public URL getURL() throws MalformedURLException(Code)

See Also:   org.apache.derby.io.StorageFile.getURL



releaseExclusiveFileLock
public synchronized void releaseExclusiveFileLock()(Code)
Release the resource associated with an earlier acquired exclusive lock
See Also:   DirFile.getExclusiveFileLock



renameTo
public boolean renameTo(StorageFile newName)(Code)
Rename the file denoted by this name. Note that StorageFile objects are immutable. This method renames the underlying file, it does not change this StorageFile object. The StorageFile object denotes the same name as before, however the exists() method will return false after the renameTo method executes successfully.

It is not specified whether this method will succeed if a file already exists under the new name.
Parameters:
  newName - the new name. true if the rename succeeded, false if not.




Fields inherited from java.io.File
final public static String pathSeparator(Code)(Java Doc)
final public static char pathSeparatorChar(Code)(Java Doc)
final public static String separator(Code)(Java Doc)
final public static char separatorChar(Code)(Java Doc)

Methods inherited from java.io.File
public boolean canExecute()(Code)(Java Doc)
public boolean canRead()(Code)(Java Doc)
public boolean canWrite()(Code)(Java Doc)
public int compareTo(File pathname)(Code)(Java Doc)
public boolean createNewFile() throws IOException(Code)(Java Doc)
public static File createTempFile(String prefix, String suffix, File directory) throws IOException(Code)(Java Doc)
public static File createTempFile(String prefix, String suffix) throws IOException(Code)(Java Doc)
public boolean delete()(Code)(Java Doc)
public void deleteOnExit()(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
public boolean exists()(Code)(Java Doc)
public File getAbsoluteFile()(Code)(Java Doc)
public String getAbsolutePath()(Code)(Java Doc)
public File getCanonicalFile() throws IOException(Code)(Java Doc)
public String getCanonicalPath() throws IOException(Code)(Java Doc)
public long getFreeSpace()(Code)(Java Doc)
public String getName()(Code)(Java Doc)
public String getParent()(Code)(Java Doc)
public File getParentFile()(Code)(Java Doc)
public String getPath()(Code)(Java Doc)
public long getTotalSpace()(Code)(Java Doc)
public long getUsableSpace()(Code)(Java Doc)
public int hashCode()(Code)(Java Doc)
public boolean isAbsolute()(Code)(Java Doc)
public boolean isDirectory()(Code)(Java Doc)
public boolean isFile()(Code)(Java Doc)
public boolean isHidden()(Code)(Java Doc)
public long lastModified()(Code)(Java Doc)
public long length()(Code)(Java Doc)
public String[] list()(Code)(Java Doc)
public String[] list(FilenameFilter filter)(Code)(Java Doc)
public File[] listFiles()(Code)(Java Doc)
public File[] listFiles(FilenameFilter filter)(Code)(Java Doc)
public File[] listFiles(FileFilter filter)(Code)(Java Doc)
public static File[] listRoots()(Code)(Java Doc)
public boolean mkdir()(Code)(Java Doc)
public boolean mkdirs()(Code)(Java Doc)
public boolean renameTo(File dest)(Code)(Java Doc)
public boolean setExecutable(boolean executable, boolean ownerOnly)(Code)(Java Doc)
public boolean setExecutable(boolean executable)(Code)(Java Doc)
public boolean setLastModified(long time)(Code)(Java Doc)
public boolean setReadOnly()(Code)(Java Doc)
public boolean setReadable(boolean readable, boolean ownerOnly)(Code)(Java Doc)
public boolean setReadable(boolean readable)(Code)(Java Doc)
public boolean setWritable(boolean writable, boolean ownerOnly)(Code)(Java Doc)
public boolean setWritable(boolean writable)(Code)(Java Doc)
public String toString()(Code)(Java Doc)
public URI toURI()(Code)(Java Doc)
public URL toURL() throws MalformedURLException(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.