Save This Page
Home » openjdk-7 » sun » misc » [javadoc | source]
sun.misc
public class: BASE64Encoder [javadoc | source]
java.lang.Object
   sun.misc.CharacterEncoder
      sun.misc.BASE64Encoder

Direct Known Subclasses:
    BasicBASE64Encoder, B64Encoder, B64Encoder, B64Encoder, JarBASE64Encoder

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.
Fields inherited from sun.misc.CharacterEncoder:
pStream
Method from sun.misc.BASE64Encoder Summary:
bytesPerAtom,   bytesPerLine,   encodeAtom
Methods from sun.misc.CharacterEncoder:
bytesPerAtom,   bytesPerLine,   encode,   encode,   encode,   encode,   encode,   encodeAtom,   encodeBuffer,   encodeBuffer,   encodeBuffer,   encodeBuffer,   encodeBuffer,   encodeBufferPrefix,   encodeBufferSuffix,   encodeLinePrefix,   encodeLineSuffix,   readFully
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from sun.misc.BASE64Encoder Detail:
 protected int bytesPerAtom() 
    this class encodes three bytes per atom.
 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.
 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.