org.ozoneDB.util
Class MimeBase64Encoder
java.lang.Object
|
+--org.ozoneDB.util.MimeBase64Encoder
- public final class MimeBase64Encoder
- extends java.lang.Object
Byte to text encoder using base 64 encoding. To create a base 64
encoding of a byte stream call translate(byte[])
for every
sequence of bytes and getCharArray()
to mark closure of
the byte stream and retrieve the text presentation.
- Author:
- Based on code from the Mozilla Directory SDK
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
out
private java.lang.StringBuffer out
buf
private int buf
buf_bytes
private int buf_bytes
line
private char[] line
line_length
private int line_length
crlf
private static final byte[] crlf
map
private static final char[] map
MimeBase64Encoder
public MimeBase64Encoder()
encode_token
private final void encode_token()
encode_partial_token
private final void encode_partial_token()
flush_line
private final void flush_line()
translate
public final void translate(byte[] in)
- 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.
getCharArray
public char[] getCharArray()
Copyright (C) The Ozone Database Project - www.ozone-db.org. All rights reserved.