Using Java 1.8 and SMBJ 0.11.5
Trying to read file from Network share using..
File remoteFile = networkShare.openFile(..); https://www.javadoc.io/doc/com.hierynomus/smbj/latest/com/hierynomus/smbj/share/DiskShare.html#openFile(java.lang.String,java.util.Set,java.util.Set,java.util.Set,com.hierynomus.mssmb2.SMB2CreateDisposition,java.util.Set)
com.hierynomus.sbmj.share.File (from network share folder) to Base64 string?
Used apache.commons.io library
java.io.InputStream is = smbFileDownload.getInputStream(); byte[] bytes1 = IOUtils.toByteArray(is); byte[] byte64 = Base64.getEncoder().encode(bytes1); String bass64Str = (new String(byte64));