java base64

130

base64 in java -

String originalInput = "test input";
String encodedString = Base64.getEncoder().encodeToString(originalInput.getBytes());

64 encode java -

byte[] encodedBytes = Base64.getEncoder().encode("Test".getBytes());
System.out.println("encodedBytes " + new String(encodedBytes));
byte[] decodedBytes = Base64.getDecoder().decode(encodedBytes);
System.out.println("decodedBytes " + new String(decodedBytes));

64 encode java -

import org.apache.commons.codec.binary.Base64;

java base64 -

import java.util.Base64;

Comments

Submit
0 Comments