|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrailo.commons.io.res.util.ResourceSupport
railo.commons.io.res.util.ReadOnlyResourceSupport
railo.commons.io.res.type.http.HTTPResource
public class HTTPResource
Field Summary |
---|
Fields inherited from interface railo.commons.io.res.Resource |
---|
ATTRIBUTE_ARCHIVE, ATTRIBUTE_HIDDEN, ATTRIBUTE_SYSTEM |
Constructor Summary | |
---|---|
HTTPResource(HTTPResourceProvider provider,
HTTPConnectionData data)
|
Method Summary | |
---|---|
boolean |
exists()
Tests whether the resource denoted by this abstract pathname exists. |
ContentType |
getContentType()
|
InputStream |
getInputStream()
|
String |
getName()
Returns the name of the resource denoted by this abstract pathname. |
String |
getParent()
Returns the pathname string of this abstract pathname's parent, or null if this pathname does not name a parent directory. |
Resource |
getParentResource()
Returns the abstract pathname of this abstract pathname's parent, or null if this pathname does not name a parent
directory. |
String |
getPath()
Converts this abstract pathname into a pathname string. |
Resource |
getRealResource(String realpath)
returns a resource that is relative to the current resource |
ResourceProvider |
getResourceProvider()
|
boolean |
isAbsolute()
Tests whether this abstract pathname is absolute. |
boolean |
isDirectory()
Tests whether the resource denoted by this abstract pathname is a directory. |
boolean |
isFile()
Tests whether the file denoted by this abstract pathname is a normal file. |
boolean |
isReadable()
Tests whether the application can read the resource denoted by this abstract pathname. |
long |
lastModified()
Returns the time that the resource denoted by this abstract pathname was last modified. |
long |
length()
Returns the length of the resource denoted by this abstract pathname. |
Resource[] |
listResources()
Returns an array of abstract pathnames denoting the files in the directory denoted by this abstract pathname. |
void |
setProxyData(ProxyData pd)
|
void |
setTimeout(int timeout)
|
void |
setUserAgent(String userAgent)
|
int |
statusCode()
|
Methods inherited from class railo.commons.io.res.util.ReadOnlyResourceSupport |
---|
createDirectory, createFile, getMode, getOutputStream, isWriteable, remove, setLastModified, setMode, setReadable, setWritable |
Methods inherited from class railo.commons.io.res.util.ResourceSupport |
---|
canRead, canWrite, copyFrom, copyTo, createNewFile, delete, equals, getAbsolutePath, getAbsoluteResource, getAttribute, getCanonicalPath, getCanonicalResource, getOutputStream, getReal, isArchive, isHidden, isSystem, list, list, list, listResources, listResources, mkdir, mkdirs, moveTo, renameTo, setArchive, setAttribute, setHidden, setReadOnly, setSystem, toString |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public HTTPResource(HTTPResourceProvider provider, HTTPConnectionData data)
Method Detail |
---|
public ContentType getContentType() throws IOException
IOException
public boolean exists()
Resource
true
if and only if the resource denoted
by this abstract pathname exists; false
otherwisepublic int statusCode()
public InputStream getInputStream() throws IOException
IOException
public String getName()
Resource
Resource.getName()
public String getParent()
Resource
null
if this pathname does not name a parent directory.
The parent of an abstract pathname consists of the pathname's prefix, if any, and each name in the pathname's name sequence except for the last. If the name sequence is empty then the pathname does not name a parent directory.
null
if this pathname
does not name a parentResource.getParent()
public Resource getParentResource()
Resource
null
if this pathname does not name a parent
directory.
The parent of an abstract pathname consists of the pathname's prefix, if any, and each name in the pathname's name sequence except for the last. If the name sequence is empty then the pathname does not name a parent directory.
null
if this pathname
does not name a parentResource.getParentResource()
public String getPath()
Resource
Resource.getPath()
public Resource getRealResource(String realpath)
Resource
Resource.getRealResource(java.lang.String)
public ResourceProvider getResourceProvider()
Resource.getResourceProvider()
public boolean isAbsolute()
Resource
true
if this abstract pathname is absolute,
false
otherwiseResource.isAbsolute()
public boolean isDirectory()
Resource
true
if and only if the file denoted by this
abstract pathname exists and is a directory;
false
otherwiseResource.isDirectory()
public boolean isFile()
Resource
true
if and only if the file denoted by this
abstract pathname exists and is a normal file;
false
otherwiseResource.isFile()
public boolean isReadable()
Resource
true
if and only if the resource specified by this
abstract pathname exists and can be read by the
application; false
otherwiseResource.isReadable()
public long lastModified()
Resource
long
value representing the time the file was
last modified, measured in milliseconds since the epoch
(00:00:00 GMT, January 1, 1970), or 0L
if the
file does not exist or if an I/O error occurspublic long length()
Resource
0L
if the resource does not existpublic Resource[] listResources()
Resource
If this abstract pathname does not denote a directory, then this
method returns null
. Otherwise an array of
File
objects is returned, one for each file or directory in
the directory. Therefore if this pathname
is absolute then each resulting pathname is absolute; if this pathname
is relative then each resulting pathname will be relative to the same
directory.
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.
null
if this abstract pathname
does not denote a directory, or if an I/O error occurs.public void setProxyData(ProxyData pd)
public void setUserAgent(String userAgent)
public void setTimeout(int timeout)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |