Are you sure this is not just a consequence of you having multiple threads writing to the same OutputStream? Have you fixed that problem yet? You don't by any chance have more than one thread reading an InputStream as well? We probably need to see the actual code that is writing the data to be able to help here...