| |
|
| java.lang.Object net.homeip.donaldm.httpdbase4j.Request
All known Subclasses: net.homeip.donaldm.httpdbase4j.CombinedRequest, net.homeip.donaldm.httpdbase4j.ArchiveRequest, net.homeip.donaldm.httpdbase4j.FileRequest,
Inner Class :public static enum HTTP_METHOD | |
m_compress | protected boolean m_compress(Code) | | If true then the output will be compressed with gzip/deflate if the
client indicates that it supports compression.
|
m_compressedFile | protected File m_compressedFile(Code) | | |
m_contentLength | protected long m_contentLength(Code) | | |
m_ex | protected HttpExchange m_ex(Code) | | The HttpExchange instance for this request.
See Also: com.sun.net.httpserver.HttpExchange |
m_method | protected HTTP_METHOD m_method(Code) | | The HTTP method
|
m_methodString | protected String m_methodString(Code) | | The HTTP method as a String
|
m_postData | protected byte[] m_postData(Code) | | |
checkClientCache | public boolean checkClientCache()(Code) | | |
compressEncoding | public String[] compressEncoding()(Code) | | Determine the compression encodings supported by the client.
A String array with the encodings accepted by the client, ordered by most desired encoding:gzip = GZip encodeddeflate = Deflate encodedtxt = No compression |
exists | abstract public boolean exists()(Code) | | Check whether the resource exists.
true if the resource exists, false if it does not |
getAbsolutePath | abstract public String getAbsolutePath()(Code) | | Return the full path of the resource
the full path of the resource |
getChildRequest | abstract public Request getChildRequest(String name)(Code) | | Create a request from the current directory request combined with a
file or directory in the current directory
Parameters: name - The name of a file or directory in the current request if thecurrent request is a directory A new Request or null if request is not a directory |
getContentLength | abstract public long getContentLength()(Code) | | Return the length of the resource.
the resource length or -1 if the length could notbe determined. |
getContentType | public String getContentType()(Code) | | The content type of the request |
getDate | abstract public Date getDate()(Code) | | Return the date of the resource
the name of the resource |
getDir | abstract public String getDir()(Code) | | Return the directory of the resource (ie all components of the path before
the final /)
the path of the resource |
getDirRequest | abstract public Request getDirRequest()(Code) | | Return the directory of the resource (ie all components of the path before
the final / as a Request contructed from this Request)
A Request for the directory containing this request |
getETag | abstract public String getETag(boolean refresh)(Code) | | Parameters: refresh - If true recalculate the tag hash even if it has alreadybeen calculated, if false reuse the cached value The ETag cacheing hash for this request |
getExtension | abstract public String getExtension()(Code) | | Return the file extension of the resource (ie the text after the final .
in the path)
the extension of the resource |
getMethod | public HTTP_METHOD getMethod()(Code) | | The request method as an HTTP_METHOD enumeration |
getMethodString | public String getMethodString()(Code) | | The request method as a String |
getName | abstract public String getName()(Code) | | Return the name of the resource (ie the final component in the path after
the final /)
the name of the resource |
getPostHandler | abstract protected Postable getPostHandler()(Code) | | Return the POST handler for this request (a class implementing the
Postable interface).
The request POST handler or null if no POST handler is defined See Also: Postable |
getRequestBytes | protected byte[] getRequestBytes(InputStream is, Headers headers) throws IOException(Code) | | Get request contents (eg a POST request contents) into a byte array.
Parameters: is - InputStream of request contents Parameters: headers - Request headers An array of bytes of the request contents or null throws: IOException - Note:Uses jchardet for charset detection (http://jchardet.sourceforge.net/) |
getRequestString | protected String getRequestString(InputStream is, Headers headers) throws IOException(Code) | | Get request contents (eg a POST request contents) as a String
Parameters: is - InputStream of request contents Parameters: headers - Request headers A String representation of the request contents or an empty string throws: IOException - Note:Uses jchardet for charset detection (http://jchardet.sourceforge.net/) |
getStream | abstract public InputStream getStream(boolean isEncoded)(Code) | | Return a stream of the resource contents.
Parameters: isEncoded - If true will return a stream for the encoded (eg gzip ordeflate) resource or if cacheing is allowed for this request and the encoded resource is in the cache then a stream for the cached version. If false returns a stream for the unencoded resource. If there is noencoding ie the client does not support encoding then both true andfalse return a stream for the unencoded resource. A stream of the resource contents. |
getStream | public InputStream getStream()(Code) | | A stream of the resource contents (encoded content is returned ifavailable). |
getURI | public URI getURI()(Code) | | The request URI |
isCacheable | public boolean isCacheable()(Code) | | true if the Request result should be cached (checks forCache-Control and Pragma:NoCache headers) |
isDirectory | abstract public boolean isDirectory()(Code) | | Check whether the resource is a directory
true if the resource is a directory, false if it is not. |
isGETorHEAD | public boolean isGETorHEAD()(Code) | | Return whether this request is an HTTP GET or HEAD
true if this request is an HTTP GET or HEAD |
isReadable | abstract public boolean isReadable()(Code) | | Check whether the resource is readable
true if the resource is readable, false if it is not. |
|
|
|