|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.sdsc.grid.io.FileFactory
public final class FileFactory
Operations include creating appropriately typed GeneralFile and GeneralRandomAccessFile objects. Creating a file object can use a "URI" (not a "URL").
| Constructor Summary | |
|---|---|
FileFactory()
|
|
| Method Summary | |
|---|---|
static GeneralFile |
newFile(GeneralAccount account,
java.lang.String path)
Creates an abstract pathname using a GeneralAccount object to first create a GeneralFileSystem connection. |
static GeneralFile |
newFile(GeneralAccount account,
java.lang.String parent,
java.lang.String child)
Creates an abstract pathname using a GeneralAccount object to first create a GeneralFileSystem connection. |
static GeneralFile |
newFile(GeneralFile parent,
java.lang.String child)
Creates an abstract pathname using a GeneralFileSystem object. |
static GeneralFile |
newFile(GeneralFileSystem fs,
java.lang.String path)
Creates an abstract pathname using a GeneralFileSystem object. |
static GeneralFile |
newFile(GeneralFileSystem fs,
java.lang.String parent,
java.lang.String child)
Creates an abstract pathname using a GeneralFileSystem object. |
static GeneralFile |
newFile(java.net.URI uri)
Creates an abstract pathname using this uri. |
static GeneralFile |
newFile(java.net.URI uri,
java.lang.Object credential)
Creates an abstract pathname using this uri. |
static GeneralFile |
newFile(java.net.URI uri,
java.lang.String password)
Creates an abstract pathname using this uri. |
static GeneralFileInputStream |
newFileInputStream(GeneralFile file)
Opens an input stream for the file on an arbitrary file system. |
static GeneralFileInputStream |
newFileInputStream(java.net.URI uri)
Opens an input stream for the file on an arbitrary file system. |
static GeneralFileOutputStream |
newFileOutputStream(GeneralFile file)
Opens an output stream for the file on an arbitrary file system. |
static GeneralFileOutputStream |
newFileOutputStream(java.net.URI uri)
Opens an output stream for the file on an arbitrary file system. |
static GeneralFileSystem |
newFileSystem(GeneralAccount account)
Creates a filesystem appropriate to the account object. |
static GeneralFileSystem |
newFileSystem(java.net.URI uri)
Creates a filesystem based on the URI. |
static GeneralFileSystem |
newFileSystem(java.net.URI uri,
java.lang.Object gssCredential)
Creates a filesystem based on the URI. |
static MetaDataRecordList |
newMetaDataRecordList(GeneralFileSystem fileSystem,
MetaDataField field,
float recordValue)
Opens an output stream for the file on an arbitrary file system. |
static MetaDataRecordList |
newMetaDataRecordList(GeneralFileSystem fileSystem,
MetaDataField field,
int recordValue)
Opens an output stream for the file on an arbitrary file system. |
static MetaDataRecordList |
newMetaDataRecordList(GeneralFileSystem fileSystem,
MetaDataField field,
MetaDataTable recordValue)
Opens an output stream for the file on an arbitrary file system. |
static MetaDataRecordList |
newMetaDataRecordList(GeneralFileSystem fileSystem,
MetaDataField field,
java.lang.String recordValue)
Opens an output stream for the file on an arbitrary file system. |
static GeneralRandomAccessFile |
newRandomAccessFile(GeneralFile file,
java.lang.String mode)
Opens a random accecss connection to the file on an arbitrary file system. |
static GeneralRandomAccessFile |
newRandomAccessFile(GeneralFileSystem fileSystem,
java.lang.String filePath,
java.lang.String mode)
Opens a random accecss connection to the file on an arbitrary file system. |
static GeneralRandomAccessFile |
newRandomAccessFile(java.net.URI uri,
java.lang.String mode)
Opens a random accecss connection to the file on an arbitrary file system. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FileFactory()
| Method Detail |
|---|
public static GeneralFileSystem newFileSystem(GeneralAccount account)
throws java.io.IOException
account - the account object used to initialize the filesystem.
java.io.IOException - If an IO error occurs during the connection to
the filesystem.
public static GeneralFileSystem newFileSystem(java.net.URI uri)
throws java.io.IOException
uri - the uri used to initialize the filesystem.
java.io.IOException - If an IO error occurs during the connection to
the filesystem.
public static GeneralFileSystem newFileSystem(java.net.URI uri,
java.lang.Object gssCredential)
throws java.io.IOException
uri - the uri used to initialize the filesystem.
java.io.IOException - If an IO error occurs during the connection to
the filesystem.
public static GeneralFile newFile(java.net.URI uri)
throws java.io.IOException
uri - A URI object of the supported schemes.
java.lang.SecurityException - The most likely cause is the URI did not
include a password. For security reasons, uri's are generally given
without the password. Acquire a new password and
java.lang.NullPointerException - If uri argument is null.
java.io.IOException - If an IO error occurs testing the connection to
the filesystem.newFile( URI uri, String password )
public static GeneralFile newFile(java.net.URI uri,
java.lang.String password)
throws java.io.IOException
Including a text password in a URI string is not advisable for security reasons. This method allows the password to obtained by more secure methods. The connection to the file will then be made through the default authorization method of the file's filesystem.
uri - A URI object of the supported schemes.password - The user's password.
java.lang.IllegalArgumentException - If the password contains illegal
charaters.
java.lang.NullPointerException - If uri argument is null.
java.io.IOException - If an IO error occurs testing the connection to
the filesystem.
public static GeneralFile newFile(java.net.URI uri,
java.lang.Object credential)
throws java.io.IOException
uri - A URI object of the supported schemes. A URI including a
password component will be overridden by the credential authorization.
java.lang.SecurityException - The most likely cause is the URI did not
include a password. For security reasons, uri's are generally given
without the password. *
java.lang.NullPointerException - If uri argument is null.
java.io.IOException - If an IO error occurs testing the connection to
the filesystem.
public static GeneralFile newFile(GeneralAccount account,
java.lang.String path)
throws java.io.IOException
account - A generic account object.path - The path to the file.
java.lang.NullPointerException - If the path argument is null.
java.io.IOException
public static GeneralFile newFile(GeneralAccount account,
java.lang.String parent,
java.lang.String child)
throws java.io.IOException
account - A generic account object.parent - The directory path to the file.child - The file name string.
java.lang.NullPointerException - If the path argument is null.
java.io.IOException
public static GeneralFile newFile(GeneralFileSystem fs,
java.lang.String path)
fs - A generic file system reference object.path - The path to the file.
java.lang.NullPointerException - If the path argument is null.
public static GeneralFile newFile(GeneralFileSystem fs,
java.lang.String parent,
java.lang.String child)
fs - A generic file system reference object.parent - The directory path to the file.child - The file name string.
java.lang.NullPointerException - If the child argument is null.
public static GeneralFile newFile(GeneralFile parent,
java.lang.String child)
parent - An abstract pathname to the file.child - The file name string.
java.lang.NullPointerException - If the child argument is null.
public static GeneralRandomAccessFile newRandomAccessFile(GeneralFileSystem fileSystem,
java.lang.String filePath,
java.lang.String mode)
throws java.io.IOException
java.lang.NullPointerException - If the file argument is null.
java.io.IOException - If an IO error occurs opening the file.
public static GeneralRandomAccessFile newRandomAccessFile(GeneralFile file,
java.lang.String mode)
throws java.io.IOException
java.lang.NullPointerException - If the file argument is null.
java.io.IOException - If an IO error occurs opening the file.
public static GeneralRandomAccessFile newRandomAccessFile(java.net.URI uri,
java.lang.String mode)
throws java.io.IOException
java.lang.NullPointerException - If the file argument is null.
java.io.IOException - If an IO error occurs opening the file.
public static GeneralFileInputStream newFileInputStream(GeneralFile file)
throws java.io.IOException
java.lang.NullPointerException - If the file argument is null.
java.io.IOException - If an IO error occurs opening the file.
public static GeneralFileInputStream newFileInputStream(java.net.URI uri)
throws java.io.IOException
java.lang.NullPointerException - If the file argument is null.
java.io.IOException - If an IO error occurs opening the file.
public static GeneralFileOutputStream newFileOutputStream(GeneralFile file)
throws java.io.IOException
java.lang.NullPointerException - If the file argument is null.
java.io.IOException - If an IO error occurs opening the file.
public static GeneralFileOutputStream newFileOutputStream(java.net.URI uri)
throws java.io.IOException
java.lang.NullPointerException - If the file argument is null.
java.io.IOException - If an IO error occurs opening the file.
public static MetaDataRecordList newMetaDataRecordList(GeneralFileSystem fileSystem,
MetaDataField field,
int recordValue)
java.lang.NullPointerException - If the file argument is null.
java.io.IOException - If an IO error occurs opening the file.
public static MetaDataRecordList newMetaDataRecordList(GeneralFileSystem fileSystem,
MetaDataField field,
float recordValue)
java.lang.NullPointerException - If the file argument is null.
java.io.IOException - If an IO error occurs opening the file.
public static MetaDataRecordList newMetaDataRecordList(GeneralFileSystem fileSystem,
MetaDataField field,
java.lang.String recordValue)
java.lang.NullPointerException - If the file argument is null.
java.io.IOException - If an IO error occurs opening the file.
public static MetaDataRecordList newMetaDataRecordList(GeneralFileSystem fileSystem,
MetaDataField field,
MetaDataTable recordValue)
java.lang.NullPointerException - If the file argument is null.
java.io.IOException - If an IO error occurs opening the file.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||