Java
Chilkat2 Java
Decode Base64 to Zip File
See more Base64 Examples
Shows how to decode a baes64 string that is the encoded representation of the bytes that make up a .zip archive. Decodes the base64 and writes the .zip file.Chilkat Java Downloads
import com.chilkatsoft.chilkat2.BinData;
import com.chilkatsoft.chilkat2.ChilkatException;
public class ChilkatExample {
public static void main(String[] args) {
String b64 = "UEsDBBQA ... AAALgQAAAAA";
BinData zipData = new BinData();
zipData.appendEncoded(b64, "base64");
try {
zipData.writeFile("qa_output/out.zip");
} catch (ChilkatException e) {
System.out.println("failed to write Zip file.");
return;
}
}
}