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

Class grendel.mime.HeaderCharsetDecoder

java.lang.Object
   |
   +----grendel.mime.HeaderCharsetDecoder

This class knows how to convert Unicode to and from the MIME encoding defined in RFC 2047.


class  HeaderCharsetDecoder
     extends java.lang.Object
{
          // Fields 1
     static HeaderCharsetDecoder decoder;

          // Constructors 1
     private HeaderCharsetDecoder();

          // Methods 3
     public static HeaderCharsetDecoder Get();
     public void mimeToUnicode(ByteBuf, StringBuffer, boolean);
     public void unicodeToMime(String, ByteBuf, boolean);
}



Fields


decoder

   static HeaderCharsetDecoder decoder



Constructors


HeaderCharsetDecoder

   private HeaderCharsetDecoder() 



Methods


Get

   public static HeaderCharsetDecoder Get() 


mimeToUnicode

   public void mimeToUnicode(ByteBuf in, 
                             StringBuffer out, 
                             boolean tokenizable_p) 

Converts a ByteBuf of raw header bytes to a StringBuffer of Unicode characters, decoding the bytes as per the encoding rules of RFC 2047. This is used by getUnicodeHeader().

Parameter Description
in The raw bytes to be decoded.
out The resultant Unicode characters.
tokenizable_p Whether the header from which these bytes came was a tokenizable header (like "From") or an unstructured-text header (like "Subject"). This information is needed because the decoding rules are subtly different for the two types of headers.



unicodeToMime

   public void unicodeToMime(String in, 
                             ByteBuf out, 
                             boolean tokenizable_p) 


All Packages  This Package  Class Hierarchy  Class Search  Index
Freshly brewed Java API Documentation automatically generated with polardoc Version 1.0.4