ozone core API

org.ozoneDB.util
Class MimeBase64Decoder

java.lang.Object
  extended byorg.ozoneDB.util.MimeBase64Decoder

public final class MimeBase64Decoder
extends java.lang.Object

Base 64 text to byte decoded. To produce the binary array from base 64 encoding call translate(char[]) for each sequence of characters and getByteArray() to mark closure of the character stream and retrieve the binary contents.

Author:
Based on code from the Mozilla Directory SDK

Field Summary
private  byte[] bytes
           
private static byte EOF
           
private static byte[] map
           
private static byte NUL
           
private  java.io.ByteArrayOutputStream out
           
private  byte[] token
           
private  int token_length
           
 
Constructor Summary
MimeBase64Decoder()
           
 
Method Summary
private  void decode_final_token()
           
private  void decode_token()
           
private  void eof()
           
 byte[] getByteArray()
           
 void translate(char[] ch)
           
 void translate(char[] ch, int offset, int length)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

out

private java.io.ByteArrayOutputStream out

token

private byte[] token

bytes

private byte[] bytes

token_length

private int token_length

NUL

private static final byte NUL
See Also:
Constant Field Values

EOF

private static final byte EOF
See Also:
Constant Field Values

map

private static final byte[] map
Constructor Detail

MimeBase64Decoder

public MimeBase64Decoder()
Method Detail

decode_token

private void decode_token()

decode_final_token

private final void decode_final_token()

translate

public final void translate(char[] ch)

translate

public final void translate(char[] ch,
                            int offset,
                            int length)

eof

private void eof()

getByteArray

public byte[] getByteArray()

ozone core API

Copyright (C) The Ozone Database Project - www.ozone-db.org. All rights reserved.