import org.apache.commons.codec.digest.DigestUtils

    /**
     * 获取远程url文件的MD5值
     */
    fun getMd5Hex(url: URL): String {
        var urlIS: InputStream? = null
        var dataInputStream: DataInputStream? = null
        try {
            urlIS = url.openStream()
            dataInputStream = DataInputStream(urlIS);
            return DigestUtils.md5Hex(dataInputStream);
        } catch (e: Exception) {
            throw e
        } finally {
            dataInputStream?.close();
            urlIS?.close()
        }
    }