|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.myjavaworld.ftp.DefaultRemoteFile
public class DefaultRemoteFile
The default implementation of RemoteFile interface.
| Constructor Summary | |
|---|---|
DefaultRemoteFile(String path)
Constructs a DefaultRemoteFile object. |
|
DefaultRemoteFile(String path,
boolean dir)
Constructs a DefaultRemoteFile object. |
|
DefaultRemoteFile(String parent,
String name)
Constructs a DefaultRemoteFile object. |
|
DefaultRemoteFile(String parent,
String name,
boolean dir)
Constructs a DefaultRemoteFile object. |
|
DefaultRemoteFile(String parent,
String name,
boolean dir,
long size,
long lastModified,
String attributes)
Constructs a DefaultRemoteFile object. |
|
DefaultRemoteFile(String parent,
String name,
boolean dir,
long size,
long lastModified,
String attributes,
int linkCount,
String owner,
String group)
Creates an instance of DefaultRemoteFile. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
|
String |
getAttributes()
Returns the attributes of this file in standard unix format. |
String |
getExtension()
Returns the extension of this file. |
String |
getGroup()
Returns the group name to which the owner of this file belongs to. |
long |
getLastModified()
Returns the last modified date of this file in milli seconds. |
int |
getLinkCount()
Returns the number of links that point to this file. |
String |
getName()
Returns the name of this remote file. |
String |
getNormalizedName()
Returns the normalized name of this remote file. |
String |
getNormalizedPath()
Returns the normalized path. |
Hashtable |
getOtherProperties()
Returns additional properties of this file if any. |
String |
getOwner()
Returns the owner of this file. |
String |
getPath()
Returns the full path of this remote file. |
long |
getSize()
Returns the size of this file in bytes. |
String |
getType()
Returns the type of this file. |
boolean |
isDirectory()
Tells whether this file is a directory or not. |
boolean |
isFile()
Tells whether this file is a data file or not. |
boolean |
isLink()
Checkes to see if this file is symbolic link. |
void |
setAttributes(String attributes)
Sets the attributes on this file to the given attributes. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultRemoteFile(String path)
DefaultRemoteFile object. The result object
will be marked as directory.
path - Absolute path.
public DefaultRemoteFile(String path,
boolean dir)
DefaultRemoteFile object.
path - Absolute pathdir - Whether or not this object is a directory.
public DefaultRemoteFile(String parent,
String name)
DefaultRemoteFile object.
parent - parent file.name - File name
public DefaultRemoteFile(String parent,
String name,
boolean dir)
DefaultRemoteFile object.
parent - Parent filename - File namedir - Whther or not this is a directory
public DefaultRemoteFile(String parent,
String name,
boolean dir,
long size,
long lastModified,
String attributes)
DefaultRemoteFile object.
parent - Parent filename - File namedir - Whether or not this is a directorysize - Size of this file in byteslastModified - Date and time this file is last modifiedattributes - Attributes of this file
public DefaultRemoteFile(String parent,
String name,
boolean dir,
long size,
long lastModified,
String attributes,
int linkCount,
String owner,
String group)
DefaultRemoteFile.
parent - parent file.name - name of this file.dir - whether this file is a directory or not.size - Size of this file.lastModified - Last modified dateattributes - Attributes or permissions.linkCount - symbolic link countowner - Owner of this file.group - Group to which the owner belongs to.| Method Detail |
|---|
public String getPath()
RemoteFile
getPath in interface RemoteFilepublic String getNormalizedPath()
RemoteFile
getNormalizedPath in interface RemoteFilepublic String getName()
RemoteFile
getName in interface RemoteFilepublic String getNormalizedName()
RemoteFile
getNormalizedName in interface RemoteFilepublic String getExtension()
RemoteFile
getExtension in interface RemoteFilepublic String getType()
RemoteFile
getType in interface RemoteFilepublic long getSize()
RemoteFile
getSize in interface RemoteFilepublic long getLastModified()
RemoteFile
getLastModified in interface RemoteFilepublic boolean isDirectory()
RemoteFile
isDirectory in interface RemoteFiletrue, if this file is a directory.
false otherwise.public boolean isFile()
RemoteFile
isFile in interface RemoteFiletrue, if this file is a data file.
false otherwise.public boolean isLink()
RemoteFile
isLink in interface RemoteFiletrue, if this file is a symbolic link.
false, otherwsie.public String getAttributes()
RemoteFile
getAttributes in interface RemoteFilepublic int getLinkCount()
RemoteFile
getLinkCount in interface RemoteFilepublic String getOwner()
RemoteFile
getOwner in interface RemoteFilepublic String getGroup()
RemoteFile
getGroup in interface RemoteFilepublic void setAttributes(String attributes)
RemoteFile
setAttributes in interface RemoteFileattributes - new attributes to set.public String toString()
toString in class Objectpublic Hashtable getOtherProperties()
RemoteFile
getOtherProperties in interface RemoteFilepublic boolean equals(Object obj)
equals in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||