Java XML Base64 Encode Decode base64ToByte(String data)

Here you can find the source of base64ToByte(String data)

Description

From a base 64 representation, returns the corresponding byte[]

License

Apache License

Parameter

Parameter Description
data The base64 representation

Return

el array binario

Declaration

public static byte[] base64ToByte(String data) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import javax.xml.bind.DatatypeConverter;

public class Main {
    /**//w w  w .  jav a2s. c  o  m
     * From a base 64 representation, returns the corresponding byte[]
     *
     * @param data The base64 representation
     * @return el array binario
     */
    public static byte[] base64ToByte(String data) {

        return DatatypeConverter.parseBase64Binary(data);
    }
}

Related

  1. base64encode(byte[] bytes, boolean pad)
  2. base64Encode(String data)
  3. base64EncodeBasicCredentials(String username, String password)
  4. base64FromBinary(byte[] value)
  5. base64FromString(String value)
  6. byteArrayToBase64String(byte[] data)
  7. BytesToBase64String(final byte[] value)
  8. byteToBase64(byte[] data)
  9. compressToBase64(byte[] message)