|
-
September 24th, 1999, 06:03 AM
#1
hello
while(m_bRun){
try{
sleep(5);
if(m_istInStream.available() > 0){
while(m_istInStream.available() > 0){
bytFromInputStream = new byte[m_istInStream.available()];
m_istInStream.read(bytFromInputStream);
strTextRead = new String(bytFromInputStream);
strTextToDisplay += strTextRead;
}
if(strTextToDisplay.endsWith("\n")){
m_frmParentFrame.displayText(strTextToDisplay);
strTextToDisplay = "";
}
}
}
catch(IOException e){
e.printStackTrace();
}
catch(InterruptedException e){
e.printStackTrace();
}
}
-
September 24th, 1999, 06:05 AM
#2
Re: hello
woops... what I meant to ask is does anyone know how to make it so that the while loop reads more than just one character at first? (it seems like it reads one character and then has to go through the while loop again to read the rest).
Any Ideas?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|