what the other guy meant by copying to a buffer was that u create a array oftype Byte, and copy data from ur stream there using ByteArrayInputStream, ok