public static byte[] readBytes(InputStream in) throws IOException {
    ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
    copyStream(in, byteOut);
    return byteOut.toByteArray();
  }
public static byte[] readBytes(InputStream in)