The Mozilla
Organization
At A Glance
Feedback
Get Involved
Newsgroups
License Terms
Newsbot
Developer Docs
Roadmap
Projects
Ports
Module Owners
Hacking
Get the Source
Build It
Testing
Download
Bugzilla
Bug Writing
Tools
View Source
Tree Status
New Checkins
Submit A Bug
FAQ
Search
Interface grendel.mime.IMimeOperator
All Packages  This Package  Class Hierarchy  Class Search  Index

Interface grendel.mime.IMimeOperator

This is the interface of objects which operate on a parsed tree of MIME objects. When an IMimeParser is created to parse a stream, an implementor of IMimeOperator is created along with it, to operate on the MIME objects as they are parsed. Each IMimeOperator has an IMimeObject associated with it, representing the node currently being parsed. It may use that to interrogate information like content-types and other header values.

See Also: MimeHTMLOperatorFactory, IMimeObject, IMimeParser


public interface  IMimeOperator
{
          // Methods 3
     public abstract IMimeOperator createChild(IMimeObject);
     public abstract void pushBytes(ByteBuf);
     public abstract void pushEOF();
}



Methods


pushBytes

   public abstract void pushBytes(ByteBuf b) 

If the MimeObject is a leaf node, this method is called with the bytes of the body. It may be called any number of times, including 0, and the blocks will not necessarily fall on line boundaries.



createChild

   public abstract IMimeOperator createChild(IMimeObject object) 

If the MimeObject is not a leaf node, this method will be called each time a new child object is seen. It should create and return a corresponding MimeOperator (which may or may not be of the same type as `this'.)



pushEOF

   public abstract void pushEOF() 

This method is called when the end of the MimeObject's body has been seen. It is called exactly once, and is called both for leaf and non-leaf MIME objects. Neither pushBytes() nor createChild() will be called after pushEOF().



All Packages  This Package  Class Hierarchy  Class Search  Index
Freshly brewed Java API Documentation automatically generated with polardoc Version 1.0.4
Copyright © 1998-1999 The Mozilla Organization.
Last modified September 9, 1998.