code: public static byte[] toByteArray(InputStream is) {
  	    if (null == is) return null;
  		try {
  			return IOUtils.toByteArray(is);
  		} catch (IOException e) {
  			logger.error("toByteArray error", e);
  		} finally {
  		    try {
                  is.close();
              } catch (IOException e) {
                  logger.error("close stream error", e);
              }
  		}
  		return null;
  	}
docs: 流转换成byte数组
  
  @param is
  @return