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
Class grendel.mime.HeaderCharsetDecoder
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
Copyright © 1998-1999 The Mozilla Organization.
Last modified December 25, 1998.