You are currently viewing a snapshot of www.mozilla.org taken on April 21, 2008. Most of this content is highly out of date (some pages haven't been updated since the project began in 1998) and exists for historical purposes only. If there are any pages on this archive site that you think should be added back to www.mozilla.org, please file a bug.



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