public class FileCopierPage extends PathHandler implements AttributedPage
| Modifier and Type | Class and Description |
|---|---|
static class |
FileCopierPage.PathType
Enumeration specifying the base directory for the relative path of the exported file.
|
httpServer, MINUTES_15, MINUTES_30, PURPLE, TEXT_HTML_CHARSET_UTF_8| Constructor and Description |
|---|
FileCopierPage(FileCopierPage.PathType pathType,
java.lang.String relativePath,
java.lang.String contentType)
Create an instance of FileCopierPage to export the specified disk file over HTTP, using the
specified contentType.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
processPage(HttpConnectionThread hct,
java.util.LinkedHashMap<java.lang.String,java.lang.String> requestHeaders,
java.io.DataInput in,
java.io.OutputStream out,
java.lang.String path)
Given an inbound HTTP request, generate a page using its parameters.
|
escPrint, escPrint, getHttpServer, outputFooterLinks, setHttpServerpublic FileCopierPage(FileCopierPage.PathType pathType, java.lang.String relativePath, java.lang.String contentType)
pathType - base directory to specify for this file's path, as defined by the PathType enumrelativePath - String of relative path of file withincontentType - HTTP-standard Content-Type MIME stringpublic java.lang.String processPage(HttpConnectionThread hct, java.util.LinkedHashMap<java.lang.String,java.lang.String> requestHeaders, java.io.DataInput in, java.io.OutputStream out, java.lang.String path) throws java.io.IOException
processPage in class PathHandlerhct - HttpConnectionThread issuing the callrequestHeaders - the HTTP request headers the browser sentin - DataInput for reading the body of the HTTP requestout - OutputStream to write the generated page topath - the remainder of the URL following the prefix identifying this particular page, in case the user is providing parameters to the pagejava.io.IOException - if the page could not be generated for some reason