/**
* 输入流转字节流
* */
private byte[] InputStreamToByte(InputStream is) throws IOException {
ByteArrayOutputStream bytestream = new ByteArrayOutputStream();
byte[] buffer=new byte[1024];
int ch;
/**
*
* */
while ((ch = is.read(buffer)) != -1) {
bytestream.write(buffer,0,ch);
}
byte data[] = bytestream.toByteArray();
bytestream.close();
return data;
}
* 输入流转字节流
* */
private byte[] InputStreamToByte(InputStream is) throws IOException {
ByteArrayOutputStream bytestream = new ByteArrayOutputStream();
byte[] buffer=new byte[1024];
int ch;
/**
*
* */
while ((ch = is.read(buffer)) != -1) {
bytestream.write(buffer,0,ch);
}
byte data[] = bytestream.toByteArray();
bytestream.close();
return data;
}