|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.noelios.restlet.local.Entity
com.noelios.restlet.local.FileEntity
public class FileEntity
Local entity based on a regular File
.
Constructor Summary | |
---|---|
FileEntity(java.io.File file)
Constructor. |
Method Summary | |
---|---|
boolean |
exists()
Indicates if the entity does exist. |
java.util.List<Entity> |
getChildren()
Returns the list of contained entities if the current entity is a directory, null otherwise. |
java.io.File |
getFile()
Returns the underlying regular file. |
java.lang.String |
getName()
Returns the name. |
Entity |
getParent()
Returns the parent directory (if any). |
Representation |
getRepresentation(MediaType defaultMediaType,
int timeToLive)
Returns a representation of this local entity. |
boolean |
isDirectory()
Indicates if the entity is a directory. |
boolean |
isNormal()
Indicates if the entity is a normal entity, especially if it is not a directory. |
Methods inherited from class com.noelios.restlet.local.Entity |
---|
getBaseName, getBaseName, getExtensions, getExtensions |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileEntity(java.io.File file)
file
- The underlying file.Method Detail |
---|
public boolean exists()
Entity
exists
in class Entity
public java.util.List<Entity> getChildren()
Entity
getChildren
in class Entity
public java.io.File getFile()
public java.lang.String getName()
Entity
getName
in class Entity
public Entity getParent()
Entity
getParent
in class Entity
public Representation getRepresentation(MediaType defaultMediaType, int timeToLive)
Entity
getRepresentation
in class Entity
defaultMediaType
- The default media typetimeToLive
- the time to live of this representation
public boolean isDirectory()
Entity
isDirectory
in class Entity
public boolean isNormal()
Entity
isNormal
in class Entity
File.isFile()
,
File.isDirectory()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |