Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

groovy BASE64 Encode

def s = 'Argh, Groovy you say, mate?'
 
String encoded = s.bytes.encodeBase64().toString()
assert 'QXJnaCwgR3Jvb3Z5IHlvdSBzYXksIG1hdGU/' == encoded
 
byte[] decoded = encoded.decodeBase64()
assert s == new String(decoded)
Comment

PREVIOUS NEXT
Code Example
Java :: How to solve towers of hanoi problem? 
Java :: java selenium new empty tab 
Java :: how to get an array as input in java 
Java :: how to get the width and height of a string in java 
Java :: Thread inline ajva 
Java :: transparent background android studio 
Java :: android round double to 2 decimal 
Java :: java create a set with values 
Java :: java convert string to int 
Java :: array to map java5 
Java :: how to reverse order of arraylist 
Java :: java random between 
Java :: how to measure the running time of a code section in java? 
Java :: add label gui jframe 
Java :: floyd triangle in java 
Java :: java file get bytes 
Java :: android up navigation 
Java :: processing draw circle 
Java :: how to make jframe visible 
Java :: how to remove character from stringbuilder in java 
Java :: junit 5 assert exception message 
Java :: arrays.asLisy in java 
Java :: Selection Structure and Conditions 
Java :: Unable to locate a Java Runtime that supports apt. 
Java :: plus one java 
Java :: target element in a sorted matrix of distinct ints 
Java :: solucion var java 
Java :: last method in jdbc 
Java :: frequency of number in java using hashmap using getordefault 
Java :: how to create textview programmatically in android 
ADD CONTENT
Topic
Content
Source link
Name
6+2 =