Home   Info   DevZone   Wiki  
UsersWeb  |  MainWeb  |  InfoWeb  |  DevZoneWeb  |  SupportWeb
ContentHandlers ] [ not logged in ] [ Web: Imported ] goto:  options
[ get info on or edit ] login or new user ] [ list of topics, hubs & nodes, or recent changes ]

ContentHandlers


This scheme for content handlers is simple and Ive thought about it for sometime, it is partially based on what I know of HotJava content handlers.

All content handlers are in the package content in the appropriate subpackage, ie, jpeg would be content.image.jpeg. The "top" pacakges are:

content.text content.image content.multipart content.message content.application content.audio content.video content.model

They corespond with the MIME media-types.

each MIME type gets its own package (image/jpeg = content.image.jpeg), in each package the following classes must be present:

ContentType ContentObject ContentReader

the following optinal classes may be present:

ContentWriter ContentRenderer

ContentType is a basic descriptor class. ContentObject is a wrapper for the actual content once read by ContentReader that decodes an inputstream. ContentWriter translates a ContentObject into an outputstream and is optianl. ContentRenderer is an optinal JComponent that renderers a ContentObject.

other classes are allowed in the package but the afformentioned classes must be in it (otherwise an appropriate exception will be thrown). these classes are derived from classes higher up in the package tree.

Im working this out, Im going to define some code and Ill reorg this page when I have a better idea of whats going on. e-mail comments questions etcetera.

DigiGod 99.05.24


Content of these pages are owned and copyrighted by the poster.
Hosted by: