All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class sun.server.util.BASE64Encoder

java.lang.Object
   |
   +----sun.server.util.CharacterEncoder
           |
           +----sun.server.util.BASE64Encoder

public class BASE64Encoder
extends CharacterEncoder
This class implements a BASE64 Character encoder as specified in RFC1521. This RFC is part of the MIME specification as published by the Internet Engineering Task Force (IETF). Unlike some other encoding schemes there is nothing in this encoding that indicates where a buffer starts or ends. This means that the encoded text will simply start with the first line of encoded text and end with the last line of encoded text.

See Also:
CharacterEncoder, BASE64Decoder

Constructor Index

 o BASE64Encoder()

Method Index

 o bytesPerAtom()
this class encodes three bytes per atom.
 o bytesPerLine()
this class encodes 57 bytes per line.
 o encodeAtom(OutputStream, byte[], int, int)
encodeAtom - Take three bytes of input and encode it as 4 printable characters.

Constructors

 o BASE64Encoder
 public BASE64Encoder()

Methods

 o bytesPerAtom
 protected int bytesPerAtom()
this class encodes three bytes per atom.

Overrides:
bytesPerAtom in class CharacterEncoder
 o bytesPerLine
 protected int bytesPerLine()
this class encodes 57 bytes per line. This results in a maximum of 57/3 * 4 or 76 characters per output line. Not counting the line termination.

Overrides:
bytesPerLine in class CharacterEncoder
 o encodeAtom
 protected void encodeAtom(OutputStream outStream,
                           byte data[],
                           int offset,
                           int len) throws IOException
encodeAtom - Take three bytes of input and encode it as 4 printable characters. Note that if the length in len is less than three is encodes either one or two '=' signs to indicate padding characters.

Overrides:
encodeAtom in class CharacterEncoder

All Packages  Class Hierarchy  This Package  Previous  Next  Index