1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97
|
<?xml version="1.0" encoding="ISO-8859-1"?>
<document>
<head>
<name>Using</name>
<doc-version>$Date: 2003/10/03 16:46:39 $</doc-version>
<author>Matt Albrecht</author>
</head>
<body>
<section name="top">Contents</section>
<OL>
<LI><A HREF="#filter">File Filters</A></LI>
<LI><A HREF="#streamgen">Stream Generators</A></LI>
<LI><A HREF="#mime">Mime Streams</A></LI>
<LI><A HREF="#readstream">Stream Reader Helpers</A></LI>
<LI><A HREF="#fileutils">FileUtils</A></LI>
<LI><A HREF="#propdb">Property Database</A></LI>
</OL>
<section name="filter">File Filters</section>
<P><A HREF="#top"><I>Back to top</I></A></P>
<P>
The various Java versions provide interfaces for file filters, which are
used in the <tt>java.io.File</tt> methods and in Swing file choosers.
However, there isn't an easy way to create a robust filter.
</P>
<P>
These classes attempt to fill the gap in the API.
</P>
<section name="streamgen">Stream Generators</section>
<P><A HREF="#top"><I>Back to top</I></A></P>
<P>
I have discovered may occations when a generic API of mine has one input
stream referencing some other input stream. As an example, XML allows
for inclusion of other XML documents through the SYSTEM entity tag. Being
able to load these other resources without knowing the details behind
where they come from seems incredibly useful in these situations.
</P>
<P>
The Stream Generator set of classes try to fill this need by providing
a factory to create new InputStreams.
</P>
<section name="mime">Mime Streams</section>
<P><A HREF="#top"><I>Back to top</I></A></P>
<P>
MIME-conversion streams. Nothing special, and nothing particularly
efficient, either. The JSP libraries have better versions, so I suggest
using those.
</P>
<section name="readstream">Stream Reader Helpers</section>
<P><A HREF="#top"><I>Back to top</I></A></P>
<P>
How many times do you find the need to read the entire contents from a
stream or reader? The <tt>ReadByteStream</tt> and <tt>ReadStringStream</tt>
classes provide the relatively trivial (yet repetitive) task of reading
entire contents of a stream or reader.
</P>
<section name="fileutils">FileUtils</section>
<P><A HREF="#top"><I>Back to top</I></A></P>
<P>
Provides simple helper utilities related to file systems, such as:
<OL>
<LI>
copy from one file to another file;
</LI>
<LI>
copy one directory to another directory, recursively;
</LI>
<LI>
find all files matching a filter set that are in a directory,
recursively.
</LI>
</OL>
</P>
<section name="propdb">Property Database</section>
<P><A HREF="#top"><I>Back to top</I></A></P>
<P>
The <tt>PropertyDatabase</tt> class provides means of having a set of
default properties, and allowing for per-user alterations. Useful for
UIs that allow for user configurable options.
</P>
</body>
</document>
|