Class URLReader

  • 实现的所有接口
    CloseableAutoCloseableReadable

    @Deprecated(since="11",
                forRemoval=true)
    public final class URLReader
    extends Reader
    Deprecated, for removal: This API element is subject to removal in a future version.
    Nashorn JavaScript script engine and APIs, and the jjs tool are deprecated with the intent to remove them in a future release.
    从URL读取的Reader。 用于确保读取器从给定URL读取内容,并且可以信任这样做。
    从以下版本开始:
    1.8u40
    • 构造方法详细信息

      • URLReader

        public URLReader​(URL url)
        Deprecated, for removal: This API element is subject to removal in a future version.
        构造函数
        参数
        url - 此URLReader的URL
        异常
        NullPointerException - 如果url为null
      • URLReader

        public URLReader​(URL url,
                         String charsetName)
        Deprecated, for removal: This API element is subject to removal in a future version.
        构造函数
        参数
        url - 此URLReader的URL
        charsetName - 用于将字节转换为字符的字符集的名称
        异常
        NullPointerException - 如果url为null
      • URLReader

        public URLReader​(URL url,
                         Charset cs)
        Deprecated, for removal: This API element is subject to removal in a future version.
        构造函数
        参数
        url - 此URLReader的URL
        cs - 用于将字节转换为字符的字符集
        异常
        NullPointerException - 如果url为null
    • 方法详细信息

      • getURL

        public URL getURL()
        Deprecated, for removal: This API element is subject to removal in a future version.
        此阅读器的URL
        结果
        此读者读取的URL。
      • getCharset

        public Charset getCharset()
        Deprecated, for removal: This API element is subject to removal in a future version.
        这个读者使用的Charset
        结果
        Charset用于将字节转换为字符