I have same problem. Desktop version of my application works, but not 
android version.
I am reading like this:

while (inBuff.ready())
{  
    sLine = inBuff.readLine();
}



On Monday, July 5, 2010 4:31:23 PM UTC+10, burzum_rus wrote:
>
> Hi all! I use BufferedInputStream in my code: 
>
> socket = new Socket(ip, Integer.parseInt(port)); 
> socket.setReceiveBufferSize(64000); 
> output = socket.getOutputStream(); 
> input =  new BufferedInputStream(socket.getInputStream(), 64000); 
>
> I read incoming packets like this: 
>
> if (input.available() != 0)  { 
>                         System.out.println("Get Packet: " + 
> input.available() + " bytes"); 
>                         byte[] b = new byte[input.available()]; 
>                         input.read(b); 
>                         incParser(b); 
> } 
>
> I always get 2048 bytes in input(though it comes more) and the data 
> left loses. How can I set buffer size of BufferedInputStream more than 
> 2048 bytes? 
> P.S. 
> This code works on Desktop as well, i can receive packets bigger than 
> 2048 bytes.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to