org.apache.batik.util.svg
Class Base64Decoder

java.lang.Object
  |
  +--org.apache.batik.util.svg.CharacterDecoder
        |
        +--org.apache.batik.util.svg.Base64Decoder

public class Base64Decoder
extends CharacterDecoder

This class implements a Base64 Character decoder as specified in RFC1113. Unlike some other encoding schemes there is nothing in this encoding that tells the decoder where a buffer starts or stops, so to use it you will need to isolate your encoded data into a single chunk and then feed them this decoder. The simplest way to do that is to read all of the encoded data into a string and then use:

	byte	mydata[];
	Base64Decoder base64 = new Base64Decoder();

	mydata = base64.decodeBuffer(bufferString);
 
This will decode the String in bufferString and give you an array of bytes in the array myData. On errors, this class throws a IOException with the following detail strings:
    "Base64Decoder: Bad Padding byte (2)."
    "Base64Decoder: Bad Padding byte (1)."
 

See Also:
CharacterEncoder, Base64Decoder

Constructor Summary
Base64Decoder()
           
 
Methods inherited from class org.apache.batik.util.svg.CharacterDecoder
decodeBuffer, decodeBuffer, decodeBuffer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Base64Decoder

public Base64Decoder()


Copyright © 2000 Apache Software Foundation. All Rights Reserved.