public static byte[] toByteArray(URI uri) throws IOException {
        return IOUtils.toByteArray(uri.toURL());
    }
Get the contents of a <code>URI</code> as a <code>byte[]</code>.

@param uri the <code>URI</code> to read
@return the requested byte array
@throws NullPointerException if the uri is null
@throws IOException          if an I/O exception occurs
@since 2.4
pay-java-common/src/main/java/com/egzosn/pay/common/util/IOUtils.java