Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 11212

Re: read webservice filename tag & pull the file from file location

$
0
0

Hi. you can use this UDF to convert the PDF to byteArray.

 

public static byte[] loadFile(String sourcePath) throws IOException {        byte[] buffer = new byte[8192];        ByteArrayOutputStream baos = new ByteArrayOutputStream();        InputStream inputStream = null;        int bytesRead;              try {            inputStream = new FileInputStream(sourcePath);            while ((bytesRead = inputStream.read(buffer)) != -1) {                baos.write(buffer, 0, bytesRead);            }                  } finally {            if (inputStream != null) {                inputStream.close();            }        }        return baos.toByteArray();    }

Viewing all articles
Browse latest Browse all 11212

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>