Package org.apache.batik.util

Examples of org.apache.batik.util.Base64Encoder


        byte[] pngBytes = encodeImage(image);

        //
        // Now, convert PNG data to Base64
        //
        Base64Encoder b64Encoder = new Base64Encoder();
        ByteArrayInputStream is = new ByteArrayInputStream(pngBytes);
        ByteArrayOutputStream os = new ByteArrayOutputStream();
        try {
            b64Encoder.encodeBuffer(new ByteArrayInputStream(pngBytes),
                                    os);
        } catch (IOException e) {
            // Should not happen because we are doing in-memory processing
            throw new SVGGraphics2DIOException(ERR_UNEXPECTED, e);
        }
View Full Code Here

TOP

Related Classes of org.apache.batik.util.Base64Encoder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.