|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.sdsc.grid.io.GeneralRandomAccessFile
edu.sdsc.grid.io.RemoteRandomAccessFile
edu.sdsc.grid.io.srb.SRBRandomAccessFile
edu.sdsc.grid.io.srb.SRBShadowFile
public class SRBShadowFile
If the SRBShadowFile refers to a file, this class can obtain input bytes from a shadow file in a SRB file system. This SRBShadowFile can also represent a shadow directory.
| Field Summary |
|---|
| Fields inherited from class edu.sdsc.grid.io.GeneralRandomAccessFile |
|---|
fd, file, fileFormat, isClosed, mode, rw, SEEK_CURRENT, SEEK_END, SEEK_START, swapNeeded |
| Constructor Summary | |
|---|---|
SRBShadowFile(SRBFile file,
java.lang.String shadowPath)
Creates a random access file stream to read from, a shadow file object with the specified name. |
|
SRBShadowFile(SRBShadowFile parent,
java.lang.String child)
Creates a random access file stream to read from, a shadow file object with the specified name. |
|
| Method Summary | |
|---|---|
java.lang.String |
getShadowPath()
|
SRBFile |
getSRBFile()
|
long |
length()
Returns the length of this file. |
java.lang.String[] |
list()
Returns an array of strings naming the files and directories in the directory denoted by this abstract pathname. |
SRBShadowFile[] |
listFiles()
Returns an array of strings naming the files and directories in the directory denoted by this abstract pathname. |
protected void |
open(GeneralFile file)
Opens the given file for use by this stream. |
void |
setLength(long newLength)
Sets the length of this file. |
java.lang.String |
toString()
|
| Methods inherited from class edu.sdsc.grid.io.srb.SRBRandomAccessFile |
|---|
close, finalize, getFilePointer, getFileSystem, read, readBytes, seek, setFileSystem, writeBytes |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SRBShadowFile(SRBFile file,
java.lang.String shadowPath)
throws java.lang.IllegalArgumentException,
java.io.FileNotFoundException,
java.lang.SecurityException,
java.io.IOException
On construction a check is made to see if read access to the file is allowed.
file - the SRB abstract filepathshadowPath - the shadow path
java.io.IOException - If an I/O error occurs
java.io.FileNotFoundException - If the file exists but is a regular file
rather than a shadow object, or cannot be opened
for any other reason.
java.lang.SecurityException - If denied read access to the file.
java.lang.IllegalArgumentException
public SRBShadowFile(SRBShadowFile parent,
java.lang.String child)
throws java.lang.IllegalArgumentException,
java.io.FileNotFoundException,
java.lang.SecurityException,
java.io.IOException
On construction a check is made to see if read access to the file is allowed.
parent - a parent abstract shadow filepathchild - the child shadow path
java.io.IOException - If an I/O error occurs
java.io.FileNotFoundException - If the file exists but is a regular file
rather than a shadow object, or cannot be opened
for any other reason.
java.lang.SecurityException - If denied read access to the file.
java.lang.IllegalArgumentException| Method Detail |
|---|
protected void open(GeneralFile file)
throws java.io.IOException
open in class SRBRandomAccessFilefile - the file to open
java.io.IOException - if an I/O error occurs.public SRBFile getSRBFile()
public java.lang.String getShadowPath()
public long length()
throws java.io.IOException
length in class SRBRandomAccessFilejava.io.IOException - if an I/O error occurs.
public void setLength(long newLength)
throws java.io.IOException
Truncating a file on the SRB Shadow Fileis not supported, so
an UnsupportedOperationException will be thrown.
(If the present length of the file as returned by the
length method is greater than the newLength
argument then the file will be truncated. In this case, if the file
offset as returned by the getFilePointer method is greater
then newLength then after this method returns the offset
will be equal to newLength.)
If the present length of the file as returned by the
length method is smaller than the newLength
argument then the file will be extended. In this case, the contents of
the extended portion of the file are not defined.
setLength in class SRBRandomAccessFilenewLength - The desired length of the file
java.io.IOException - If an I/O error occurs
java.lang.UnsupportedOperationException - on truncatepublic java.lang.String toString()
toString in class GeneralRandomAccessFilepublic java.lang.String[] list()
There is no guarantee that the name strings in the resulting array will appear in any specific order; they are not, in particular, guaranteed to appear in alphabetical order.
This method will return all the files in the directory. Listing directories with a large number of files may take a very long time.
public SRBShadowFile[] listFiles()
There is no guarantee that the name strings in the resulting array will appear in any specific order; they are not, in particular, guaranteed to appear in alphabetical order.
This method will return all the files in the directory. Listing directories with a large number of files may take a very long time.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||