InputStream is ;
ByteArrayOutputStream baos = new ByteArrayOutputStream();
byte[] b = new byte[1024];
int len = 0;
while((len = is.read(b)) != -1) {
baos.write(b,o,len);
}
baos.toByteArray();
InputStream is ;
ByteArrayOutputStream baos = new ByteArrayOutputStream();
byte[] b = new byte[1024];
int len = 0;
while((len = is.read(b)) != -1) {
baos.write(b,o,len);
}
baos.toByteArray();