java - First character missing from bufferedreader of socket -


i reading string bufferedreader of socket first character keeps going missing.

the time read stream when store in string dummy. don't understand why first character go missing.

i thought might in processmessage function might causing it, commented line out , ran code again , first character still went missing.

any appreciated.

bufferedreader infromserver = new bufferedreader(new inputstreamreader(servertcp.getinputstream()));          while(true){          try{             //try , read message , process              string dummy = infromserver.readline();             system.out.println("received message1: " + dummy);             processmessage(dummy);          } catch (exception e) {          }        } 


Comments

Popular posts from this blog

node.js - Using Node without global install -

How to access a php class file from PHPFox framework into javascript code written in simple HTML file? -

java - Null response to php query in android, even though php works properly -