Hive的Base64使用

 public static void main(String[] args) throws IOException {
        BASE64Encoder base64=new BASE64Encoder();
        base64.encode("http://www.xnhzj.com/".getBytes("utf-8"), System.out);
        System.out.println();
        String apache = new String(org.apache.commons.codec.binary.Base64.encodeBase64("http://www.xnhzj.com/".getBytes()));
        System.out.println(apache);
        System.out.println();
        BASE64Decoder base64De = new BASE64Decoder();
        System.out.println(new String(base64De.decodeBuffer(new ByteArrayInputStream(apache.getBytes("utf-8")))));
        List<? extends Object> lit = new ArrayList<String>();
    }

 

你可能感兴趣的:(Hive的Base64使用)