RTEditor/src/main/java/com/onegravity/rteditor/utils/io/IOUtils.java
public static byte[] toByteArray(URL url) throws IOException {
        URLConnection conn = url.openConnection();
        try {
            return IOUtils.toByteArray(conn);
        } finally {
            close(conn);
        }
    }
public static byte[] toByteArray(URL url) throws IOException {
        URLConnection conn = url.openConnection();
        try {
            return IOUtils.toByteArray(conn);
        } finally {
            close(conn);
        }
    }
Get the contents of a <code>URL</code> as a <code>byte[]</code>.

@param url the <code>URL</code> to read
@return the requested byte array
@throws NullPointerException if the input is null
@throws IOException          if an I/O exception occurs
@since 2.4