Http://www.javaidea.net/list.jsp? Topic = 5
Author: Home cat
Base64 encoding is a common character encoding, which is used in many places. JDK provides very convenient base64encoder and base64decoder, which can be used to conveniently complete base64
: This article mainly introduces how base64 works and uses PHP to implement it. if you are interested in the PHP Tutorial, refer to it. Developers must be familiar with Base64 encoding, and it is not necessary to have a clear understanding of it.
Http://www.javatips.net/blog/2011/08/how-to-encode-and-decode-in-base64-using-javahttp://commons.apache.org/proper/commons-codec/Official Download linkEncode and Decode in Base64 using Java explains on different techniques for Encode Base64 using
Recently writing interface ———— about image upload
The foreground uses the Vuejs, uses the base64 to upload the picture, filedata: "Data:image/jpeg;base64,9j/4aaqsk ...", puts this data directly in the address bar, also can display the picture, But
Java has always lacked the BASE64 encoding API, which is often used by third-party API implementations in project development. However, Java 8 implements the BASE64 codec API, which contains the Java.util package. I'm going to do an introduction to
Java8 BASE64 Codec Java has always lacked the BASE64 encoding API, which is often used by third-party API implementations in project development. However, Java 8 implements the BASE64 codec API, which contains the Java.util package. I'm going to do
How to use:
The following IMG is taken over by Base64 encoded pictures
To store this picture.String img=request.getparameter ("img");System.out.print (img+ "= =");Typeconverter.generateimage (IMG);
public class TypeConverter {//Picture into Base64
Base64 Basic Algorithm principle
String instance (Base64 codec for S13)Test: S13Code: CzezDecoding: S13
How to encode the process analysis of S13 for Czez:
BASE64 requires converting every three 8Bit bytes to four 6Bit bytes (3*8 = 4*6 = 24), and
One, base64 picture codecBasic flow: Download a picture from the network. Then base64 encoding, and then base64 decoding, stored in the local e-packing folder.
One, base64 picture codecBasic process: Download a picture from the network, then Base64 encoding, and then base64 decoding, stored in the local e-packing directory.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.