0 Replies Latest reply on Jul 4, 2010 9:49 AM by SOMEONEINTHEWORLD

    Reading bytes

    SOMEONEINTHEWORLD

      Hello,

       

      I am trying to read socket data sent by java server.

       

      i am not getting all the data at one, i want to keep on reading until all the bytes are read.

       

      socket sent by server is 100 bytes,

       

      while(socket.bytesAvailable < 100)

      {

           data = socket.readUTFBytes(socket.readUTFBytes(100)); // not getting the values

       

           if(data.length = 100)

              fullData(data);

      }

       

       

      Can someone tell me how to keep on reading until all the 100 bytes are received and sent to a function fullData?

       

      Thanks