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.MimeBase64Decoder

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

Implements a plaintext -> Base64 encoder.


public final class  MimeBase64Decoder
     extends grendel.mime.encoder.MimeEncoder
{
          // Fields 6
     private static final byte EOF;
     private static final byte NUL;
     private byte[] bytes;
     private static final byte[] map;
     private byte[] token;
     private int token_length;

          // Constructors 1
     public MimeBase64Decoder();

          // Methods 4
     private final void decode_final_token(ByteBuf);
     private final void decode_token(ByteBuf);
     public final void eof(ByteBuf);
     public final void translate(ByteBuf, ByteBuf);
}



Fields


token

   private byte[] token


bytes

   private byte[] bytes


token_length

   private int token_length


NUL

   private static final byte NUL


EOF

   private static final byte EOF


map

   private static final byte[] map



Constructors


MimeBase64Decoder

   public MimeBase64Decoder() 

Default constructor




Methods


decode_token

   private final void decode_token(ByteBuf out) 


decode_final_token

   private final void decode_final_token(ByteBuf out) 


translate

   public final void translate(ByteBuf in, 
                               ByteBuf out) 

Given a sequence of input bytes using the Base64 encoding, produces a sequence of unencoded output bytes. Note that some (small) amount of buffering may be necessary, if the input byte stream didn't fall on an appropriate boundary. 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 decoder 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