Java – use the base64 class in JDK7
•
Java
I tried to use the base64 class in JDK7, but the base64 I got could not resolve the error Why does eclipse throw this error?
I am using the following code
byte[] imageData = Base64.getDecoder().decode(readFile(imagePart.getInputStream()));
Even the import statement displays the same error: import Java util. Base64;
Is this class not available in JDK7?
Solution
From documentation:
So no, it is not available in JDK 7
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码