@ JsonIgnore public void encodeAndSetContent ( byte [ ] byteContent ) { if ( byteContent == null ) { this . content = null ; return ; } this . content = Base64 . getEncoder ( ) . encodeToString ( byteContent ) ; encoding = "base64" ; }
Encodes the provided byte array using Base64 and sets it as the content . The encoding property of this instance will be set to base64 .