Question
Tekclan Solutions
IN
Last activity: 24 Apr 2018 6:00 EDT
Building a standalone Java application to read pzpvstream
We are trying to extract the pzpvstream column blob content using a standalone java application. The java code written is based on the inputs given in the following thread.
https://pdn.pega.com/community/product-support/question/reading-pzpvstream-using-java
Unfortunately, we are still unable to extract all the data from the blob using the inflateroutputstream as it produces a lot of junk values in the output. We are using pega 6.3. Any help on this front will be really appreciated. I have attached the code snippet below for reference
byte[] data = hexStringToByteArray("blob content goes here");
ByteArrayOutputStream blobstream= new ByteArrayOutputStream();
Inflater decompresser = new Inflater(true);
InflaterOutputStream inflaterOutputStream = new InflaterOutputStream(blobstream, decompresser);
inflaterOutputStream.write(data,11,data.length-11);
inflaterOutputStream.close();
String blobextract = new String((stream2.toByteArray()));
System.out.println("--------output----------");
System.out.println(blobextract );