How to indicate end of clob from pl/sql?

I have a temporary clob that I am creating in a pl/sql stored procedure using DBMS_LOB.CREATETEMPORARY and then I am passing the clob into a Java stored procedure which is supposed to read all the data from that clob ( doing stuff with it ) and then return when there is no more data to read. I get the oracle.sql.CLOB's InputStream with getAsciiInputStream and