|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectNOS.io.NOSFile
public class NOSFile
| Constructor Summary | |
|---|---|
NOSFile(java.lang.String path)
Creates a new NOSFile object. |
|
| Method Summary | |
|---|---|
boolean |
copyInto(NOSFile target)
Makes a copy of this file |
boolean |
delete()
Removes this file and all sub-files from the server. |
boolean |
exists()
Returns true if this file exists on the server. |
java.lang.String |
getExtension()
Returns the extension of this file (eg: .bmp .jpg .gif .txt .html) |
javax.swing.Icon |
getIcon()
Returns a 25x25 pixel icon for this file. |
java.io.InputStream |
getInputStream()
Returns an InputStream for reading from this file. |
java.io.InputStream |
getInputStream(NOSTransferProgressListener list)
Returns an InputStream for reading from this file. |
java.lang.String |
getName()
Returns the name of this file |
java.io.OutputStream |
getOutputStream()
Returns an OutputStream for writing to this file. |
java.io.OutputStream |
getOutputStream(NOSTransferProgressListener list)
Returns an OutputStream for writing to this file. |
java.lang.String |
getParent()
Returns the path of the parent of this file |
NOSFile |
getParentFile()
Returns the parent file of this file |
java.lang.String |
getPath()
Returns the path to this file |
java.lang.String |
getRemotePath()
Returns the path to this file as it would appear in a URL. |
boolean |
isDirectory()
Returns true if this file is a directory |
long |
length()
Returns the length of this file in bytes. |
NOSFile[] |
listFiles()
Returns a list of the files contained within this file (if it is a directory). |
NOSFile[] |
listFiles(boolean forcerefresh)
Returns a list of the files contained within this file (if it is a directory). |
NOSFile |
makeCopy()
Makes a copy of this NOSFile object (not the file itself). |
boolean |
mkdirs()
Creates directories for all the parent directories of this file and a directory with the name of this file (just like the finction in the normal File object). |
boolean |
rename(java.lang.String newpath)
Renames this file |
java.lang.String |
toString()
Returns a String representation of this NOSFile |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public NOSFile(java.lang.String path)
path - The path to the file| Method Detail |
|---|
public java.lang.String getPath()
public java.lang.String getRemotePath()
public NOSFile getParentFile()
public java.lang.String getParent()
public java.lang.String getName()
public java.lang.String getExtension()
public javax.swing.Icon getIcon()
public NOSFile[] listFiles()
public NOSFile[] listFiles(boolean forcerefresh)
forcerefresh - If true the the server will be interrogated for a
new list of files.
public long length()
public boolean mkdirs()
public boolean delete()
public boolean rename(java.lang.String newpath)
newpath - The new name
public boolean copyInto(NOSFile target)
target - The file into which to copy this file.
public boolean isDirectory()
public boolean exists()
public java.io.InputStream getInputStream()
throws java.io.IOException
java.io.IOException - If an error occurs
public java.io.InputStream getInputStream(NOSTransferProgressListener list)
throws java.io.IOException
list - A NOSTransferProgressListener
java.io.IOException - If an error occurs
public java.io.OutputStream getOutputStream()
throws java.io.IOException
java.io.IOException - If an error occurs
public java.io.OutputStream getOutputStream(NOSTransferProgressListener list)
throws java.io.IOException
list - A NOSTransferProgressListener
java.io.IOException - If an error occurspublic NOSFile makeCopy()
public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||