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.encoder.MimeBase64Encoder

java.lang.Object
   |
   +----grendel.mime.encoder.MimeEncoder
           |
           +----grendel.mime.encoder.MimeBase64Encoder

Implements a Base64 -> plaintext decoder.


public final class  MimeBase64Encoder
     extends grendel.mime.encoder.MimeEncoder
{
          // Fields 6
     private int buf;
     private int buf_bytes;
     private static final byte[] crlf;
     private byte[] line;
     private int line_length;
     private static final byte[] map;

          // Constructors 1
     public MimeBase64Encoder();

          // Methods 5
     private final void encode_partial_token();
     private final void encode_token();
     public final void eof(ByteBuf);
     private final void flush_line(ByteBuf);
     public final void translate(ByteBuf, ByteBuf);
}



Fields


buf

   private int buf


buf_bytes

   private int buf_bytes


line

   private byte[] line


line_length

   private int line_length


crlf

   private static final byte[] crlf


map

   private static final byte[] map



Constructors


MimeBase64Encoder

   public MimeBase64Encoder() 

Default constructor




Methods


encode_token

   private final void encode_token() 


encode_partial_token

   private final void encode_partial_token() 


flush_line

   private final void flush_line(ByteBuf out) 


translate

   public final void translate(ByteBuf in, 
                               ByteBuf out) 

Given a sequence of input bytes, produces a sequence of output bytes using the base64 encoding. If there are bytes in `out' already, the new bytes are appended, so the caller should do `out.setLength(0)' first if that's desired.

Overrides:
translate in class MimeEncoder


eof

   public final void eof(ByteBuf out) 

Tell the base64 encoder that no more input data will be forthcoming. This may result in output, as a result of flushing the internal buffer. This object must not be used again after calling eof(). If there are bytes in `out' already, the new bytes are appended, so the caller should do `out.setLength(0)' first if that's desired.

Overrides:
eof in class MimeEncoder


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