October 8th, 2010, 07:43 AM
so, what is a better approach to scanning buffer? when i look up java api, that is the only method available.
October 8th, 2010, 02:45 AM
i am thinking of if nothing in inputstream, sleep for 100ms, this is if your read is in a seperate thread from your write
if(Inputstream.available()==0) Thread.sleep(100);
October 8th, 2010, 02:33 AM
keang is talking about this piece of code
while (br.readLine()!= null) { // in the while condition, you read a line but didn't do anything.
for(int ox=0;ox<5;ox++){
q[ox]= new...
October 7th, 2010, 06:26 AM
thanks keang, i have already figured out what my problem was shortly after i posted it. Sometimes the best solution to a problem is to take a rest and fresh yourself before continueing on it, haha
October 6th, 2010, 10:01 PM
I am not sure if this will be useful... This is the method i used to set up my ringQueue. and it also belongs to the RingQueue class.
public class RingQueue{
...
...
/**...
October 6th, 2010, 09:56 PM
Hi, i am working on a generic RingQueue ADT, however i came across a nullpointer exception during runtime and i cannot figure out what exactly my problem was.
/** Node of a singly linked list...