Oracle Database BLOB to InputStream in Java?

后端 未结 2 2092
小蘑菇
小蘑菇 2020-12-11 07:24

I made a Java function that takes an InputStream as an input. I have a oracle.sql.BLOB instance to pass to that function. How can I convert it to

2条回答
  •  猫巷女王i
    2020-12-11 08:20

    Declare your Java parameter of type oracle.sql.BLOB as per the "Mapping Datatypes" documentation. Then, you call getBinaryStream() on that BLOB object to obtain your InputStream.

提交回复
热议问题