Trapping dbms_output.put_line output

how can I trap dbms_output.put_line output from a procedure when i cam calling the oracle procedure through JDBCadapater