Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Flush InputStream??

843785Aug 14 2008 — edited Aug 15 2008
I used InputStream for reading socket. I need flush InputStream object before reading socket in second time. Below I show my code sample.Anyone can give me any hints. Thank you

InputStream inReader=sock.getInputStream();
int rc=inReader.read(msgBuf,0,128);

//I want flush here before read again

int secondRecMsg=inReader.read(secondRecMsgBuf,0,128);
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 12 2008
Added on Aug 14 2008
5 comments
1,549 views