code: public static byte[] getBytesFromHttp(String httpFileURL) throws IOException {
  
          InputStream bufferedInputStream = null;
          try {
              bufferedInputStream = getInputStreamFromHttp(httpFileURL);
              ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
              byte[] buffer = new byte[BUFFER_SIZE];
              for (int len = 0; (len = bufferedInputStream.read(buffer)) != -1;) {
                  byteArrayOutputStream.write(buffer, 0, len);
              }
              byte[] arrayOfByte1 = byteArrayOutputStream.toByteArray();
              return arrayOfByte1;
          } finally {
              if (bufferedInputStream != null)
                  bufferedInputStream.close();
          }
      }
docs: Get destination web file bytes.
  
  @param httpFileURL
  the web file url which you want to download.
  @return the destination file bytes.
  @throws IOException