You are currently viewing a snapshot of 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, please file a bug.

All Packages  This Package  Class Hierarchy  Class Search  Index

Class 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);



   static HeaderCharsetDecoder decoder



   private HeaderCharsetDecoder() 



   public static HeaderCharsetDecoder Get() 


   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.


   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