get file from message - JavaMail library

get bytes

BASE64DecoderStream base64DecoderStream = (BASE64DecoderStream) obj;
byte[] byteArray = IOUtils.toByteArray(base64DecoderStream);
byte[] encodeBase64 = Base64.encodeBase64(byteArray);

=========

return inputstream for download process

Resource <= InputStreamResource

return new InputStreamResource(part.getInputStream());

Comments

Popular posts from this blog

Validation for AZ phone numbers with RegEx in Java

Java necə işləyir, kod nədir ?