code: public static int readBytesFromOtherInputStream(InputStream is, byte[] targetArray) throws IOException
      {
          assert targetArray != null;
          if (targetArray.length == 0) return 0;
          int len;
          int off = 0;
          while (off < targetArray.length && (len = is.read(targetArray, off, targetArray.length - off)) != -1)
          {
              off += len;
          }
          return off;
      }
docs: 从InputStream读取指定长度的字节出来
  @param is 流
  @param targetArray output
  @return 实际读取了多少字节，返回0表示遇到了文件尾部
  @throws IOException