| java.lang.Object javax.servlet.GenericServlet javax.servlet.http.HttpServlet com.sun.portal.portlet.rssportlet.filecache.FileCache
Inner Class :class FileCacheData | |
Method Summary | |
public void | doGet(HttpServletRequest request, HttpServletResponse response) | public void | doPost(HttpServletRequest request, HttpServletResponse response) | public boolean | forward(String cookieName, boolean allCookies, List cookiesToForwardList)
This method returns true if allCookies property is true otherwise checks
if the cookie name exists in the cookiesToForward list and returns true if
it does or false if it doesn't. | protected String | getContentEncoding(String contentType, byte[] bytes, String MIMEType) Gets the charset
This method determines the charset based on the contentType header if it
is available (only applies to http(s) urls), or from the inputEncoding
property if it is non-blank, or from the meta tag in content, e.g. | protected String | getContentEncodingFromContentBytes(byte[] contentBytes) | protected File | getFile(String pathname) This method is called by getContent() if the url returned by
getURL() is a file url. | protected StringBuffer | getFileAsBuffer(String pathName) | protected FileCacheData | getFileCache(HttpServletRequest req, HttpServletResponse res, String fileName) | protected StringBuffer | getHttpContent(HttpServletRequest req, HttpServletResponse res, String url)
Get the provider's content by retrieving content from the specified http
or https URL. | public String | getInputEncoding()
Gets the inputEncoding to be used by content. | protected StringBuffer | getRemoteFile(HttpServletRequest req, HttpServletResponse res, String fileLocation)
Gets the file as a string buffer. | protected String | getRuleSetID()
Gets the urlScraperRulesetID to be used by rewriter. | protected int | getTimeout() Gets the timeout property for the provider. | public void | init(ServletConfig servletConf) | public byte[] | readContent(InputStream in, int contentLength) |
debug | protected boolean debug(Code) | | |
typeTable | protected static String typeTable(Code) | | Array of File extensions mapped to the MIMETypes
|
forward | public boolean forward(String cookieName, boolean allCookies, List cookiesToForwardList)(Code) | |
This method returns true if allCookies property is true otherwise checks
if the cookie name exists in the cookiesToForward list and returns true if
it does or false if it doesn't.
Parameters: allCookies - allCookies property value from display profile Parameters: cookiesToForwardList - cookiesToForwardList property value fromdisplay profile Parameters: cookieName - Description of the Parameter boolean value |
getContentEncoding | protected String getContentEncoding(String contentType, byte[] bytes, String MIMEType)(Code) | | Gets the charset
This method determines the charset based on the contentType header if it
is available (only applies to http(s) urls), or from the inputEncoding
property if it is non-blank, or from the meta tag in content, e.g. meta
tag in html, xml or wml header if they are available (only applies to
HTML, XML, WML).
Parameters: contentType - If http(s) urls, null otherwise Parameters: bytes - Bytes from the scraped content Parameters: MIMEType - MIMEType for the content String charset or null if charset cannot be determined See Also: com.sun.portal.providers.ProviderException |
getContentEncodingFromContentBytes | protected String getContentEncodingFromContentBytes(byte[] contentBytes)(Code) | | Gets the charset from content
This method determines the charset based on meta tag in content
Parameters: contentBytes - Bytes from the scraped content String charset or null if charset cannot be determined |
getFile | protected File getFile(String pathname)(Code) | | This method is called by getContent() if the url returned by
getURL() is a file url.
Parameters: pathname - Description of the Parameter File Object specified by the pathName or null if the filedoes not exists or cannot be read. |
getFileCache | protected FileCacheData getFileCache(HttpServletRequest req, HttpServletResponse res, String fileName)(Code) | | This method will get the file if it exists locally and the disk cache
timeout value has not expired
Parameters: req - Description of the Parameter Parameters: res - Description of the Parameter Parameters: fileName - Description of the Parameter the contents of the file |
getHttpContent | protected StringBuffer getHttpContent(HttpServletRequest req, HttpServletResponse res, String url) throws InterruptedException, MalformedURLException(Code) | |
Get the provider's content by retrieving content from the specified http
or https URL.
This method does not handle file URLs. It only handles http or https urls.
The content scraped from the specified url is rewritten if a rewriter is
available using the ruleset returned by getRuleSetID()
This method throws exceptions for certain exceptional conditions instead
of returning an error message in the returned StringBuffer
Parameters: req - An HttpServletRequest that containsinformation related to this request for content. Parameters: res - An HttpServletResponse that allows theprovider to influence the overall response for the desktop page(besides generating the content). Parameters: url - http or https url string Scraped content exception: InterruptedException - if there is a timeout while trying to getthe scraped content exception: MalformedURLException - if the url passed in is not a valid httpor https url. See Also: com.sun.portal.providers.ProviderException See Also: FileCache.getRuleSetID |
getRemoteFile | protected StringBuffer getRemoteFile(HttpServletRequest req, HttpServletResponse res, String fileLocation) throws IOException(Code) | |
Gets the file as a string buffer.
This method calls the getHttpContent method to get the XML
file content as a StringBuffer if the XML URL specified is a http or https
url.
Parameters: fileLocation - Location of the file Parameters: req - Description of the Parameter Parameters: res - Description of the Parameter the file contents as a StringBuffer |
readContent | public byte[] readContent(InputStream in, int contentLength) throws IOException(Code) | | Description of the Method
Parameters: in - Description of the Parameter Parameters: contentLength - Description of the Parameter Description of the Return Value |
Methods inherited from javax.servlet.http.HttpServlet | protected void doDelete(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)(Java Doc) protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)(Java Doc) protected void doHead(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)(Java Doc) protected void doOptions(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)(Java Doc) protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)(Java Doc) protected void doPut(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)(Java Doc) protected void doTrace(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)(Java Doc) protected long getLastModified(HttpServletRequest req)(Code)(Java Doc) protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)(Java Doc) public void service(ServletRequest req, ServletResponse res) throws ServletException, IOException(Code)(Java Doc)
|
|
|