Java: Need to create PDF from byte-Array

后端 未结 4 1867
逝去的感伤
逝去的感伤 2021-02-02 13:20

From a DB2 table I\'ve got blob which I\'m converting to a byte array so I can work with it. I need to take the byte array and create a PDF out of it.

This

4条回答
  •  一向
    一向 (楼主)
    2021-02-02 14:12

    One can utilize the autoclosable interface that was introduced in java 7.

    try (OutputStream out = new FileOutputStream("out.pdf")) {
       out.write(bArray);
    }
    

提交回复
热议问题