/**
* 通过InputStream 转Byte数组
*
* @param inStream
* @return
* @throws IOException
*/
public static final byte[] inputToByte(InputStream inStream) throws IOException {
ByteArrayOutputStream swapStream = new ByteArrayOutputStream();
byte[] buff = new byte[PmsConstantsFinal.INPUTSTREAM_TO_BYTE];
int rc = 0;
while ((rc = inStream.read(buff, 0, PmsConstantsFinal.INPUTSTREAM_TO_BYTE)) > 0) {
swapStream.write(buff, 0, rc);
}
byte[] in2b = swapStream.toByteArray();
return in2b;
}