A simple FileHandler to display HTML pages. It is primarily intended for the display of simple locally stored documentation files, but it can act as a very primitive web browser too.
Simple backward/forward navigation support is available as well as going back to the first loaded page which is treated as “home”. No manual entering of URLs is possible however, though the URL of the currently displayed page can be copied for other uses.
In case loading a page fails for some reason, no error page is generated by the FileHandler itself, but rather the reason will be displayed in the statusbar and the current page stays active.
The supported HTML is very restricted due to the limitations of the standard Java HTML control:
Only HTML 3.2 and some extensions borrowed from 4.0 are supported, see the documentation of the Java Swing HtmlEditorKit for more information.
No support for JavaScript is present.
No cookie support is provided.
Over a slow network connection, the browsing experience will not be very pleasant as no caching of already retrieved data is performed by this FileHandler. Thus pages with a lot of images will reload all these images again and again ...
The FileHandler provides support for displaying HTML and plain text content retrieved through a given URL. Special support is provided to deal with the most common image formats (PNG, JPG and GIF) and thus allows viewing those too.
Apart from opening .html
files, special treatment of
files with an extension of .url
is provided. These are
simple configuration files in a format commonly found on the Windows platform
which provides only the definition of a hyperlink. Opening such a file will
actually display the page at the hyperlink defined in that file. Such a file
might be named boarderzone.url
and look like this:
[InternetShortcut] URL = http://www.boarderzone.net/
The FileHandler is a pure viewer and thus doesn't support any modification of the loaded data or saving it in any form.