简体   繁体   中英

How to convert the SQL image datatype to base64 string in java

i was trying to create the file from the database file content is stored in sql image datatype field, as per few blogs data stored in image datatype is binary format but when I tried to convert them into base64 string it throwing errors(i have used online tools). Is there any example code that can help me out.

Sample file content

The image data type corresponds to the byte[] type in Java.

You can use java.util.Base64 to convert byte[] to Base64 encoded String .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM