Abstract superclass for the convenience classes
SummaryInformation and
DocumentSummaryInformation .
The motivation behind this class is quite nasty if you look
behind the scenes, but it serves the application programmer well by
providing him with the easy-to-use
SummaryInformation and
DocumentSummaryInformation classes. When parsing the data a
property set stream consists of (possibly coming from an
java.io.InputStream ) we want to read and process each byte only
once. Since we don't know in advance which kind of property set we
have, we can expect only the most general
PropertySet . Creating a special subclass should be as easy as
calling the special subclass' constructor and pass the general
PropertySet in. To make things easy internally, the special
class just holds a reference to the general
PropertySet and
delegates all method calls to it.
A cleaner implementation would have been like this: The
PropertySetFactory parses the stream data into some internal
object first. Then it finds out whether the stream is a
SummaryInformation , a
DocumentSummaryInformation or a
general
PropertySet . However, the current implementation
went the other way round historically: the convenience classes came
only late to my mind.
author: Rainer Klute author: href="mailto:klute@rainer-klute.de"><klute@rainer-klute.de> version: $Id: SpecialPropertySet.java 489730 2006-12-22 19:18:16Z bayard $ since: 2002-02-09 |