1 17 package org.apache.ws.jaxme.util; 18 19 import java.io.IOException ; 20 21 import sun.misc.BASE64Decoder; 22 import sun.misc.BASE64Encoder; 23 24 25 27 public class Base64Binary { 28 30 public static byte[] getClone(byte[] pValue) { 31 byte[] result = new byte[pValue.length]; 32 System.arraycopy(pValue, 0, result, 0, pValue.length); 33 return result; 34 } 35 36 39 public static byte[] decode(String pValue) throws IOException { 40 return (new BASE64Decoder()).decodeBuffer(pValue); 41 } 42 43 46 public static String encode(byte[] pValue) { 47 return (new BASE64Encoder()).encode(pValue); 48 } 49 } 50 | Popular Tags |