Home » Developer & Programmer » JDeveloper, Java & XML » TOTALLY NOT ORACLE BUT THIS FORUM RESPONDS QUICK
TOTALLY NOT ORACLE BUT THIS FORUM RESPONDS QUICK [message #168700] Fri, 21 April 2006 12:41 Go to next message
booga2
Messages: 18
Registered: March 2006
Location: Windsor
Junior Member
I REALIZE THIS IS AN ORACLE FORUM, but since Java is used hand in hand in some cases i figured i'd test the waters. I've posted on java site but replies are nil or not very good.

Anyways this forum rox. here is my question.
INPUTSTREAMS .. any of them datainputstream what ever..
Im reading the bytes coming from the stream.. Now say i sent "THIS STRRING" and I added a "\n" at the end so essentially the string its "THIS STRING\n" .. now here is the problem. I need to stop reading when i hit the "\n" ?? any suggestions? because the next string that comes after the "\n" i need to put somewhere else? thats it.. thanks.. ! Please don't send me hate mail of THIS IS AN ORACLE FORUM.. Very Happy
Re: TOTALLY NOT ORACLE BUT THIS FORUM RESPONDS QUICK [message #168718 is a reply to message #168700] Fri, 21 April 2006 15:15 Go to previous message
markmal
Messages: 113
Registered: April 2006
Location: Toronto, Canada
Senior Member
To make your question oracle related use a trick
"I need to write an oracle stored procedure in Java.Wink

then. You do not have to stop reading. Especially if you are going to put following value later to somewhere else.
You need to use "parsing" readers.

PreparedStatement pstmt = new PreparedStatement("SELECT clob_col FROM clob_tab");
ResultSet rset = pstmt.executeQuery();
Clob clob = results.getClob( 1 );
InputStream inStr = c_lob.getAsciiStream();
BufferedReader rd = new BufferedReader(new InputStreamReader(inStr));
String line;

while ((line = rd.readLine()) != null) {
// Process line...
}

Previous Topic: ORA-03113 with dbms_xslprocessor.selectnodes
Next Topic: Help me when Install oc4j
Goto Forum:
  


Current Time: Thu Mar 28 18:00:46 CDT 2024