- java.lang.Object
- 
- java.io.Reader
- 
- jdk.nashorn.api.scripting.URLReader
 
 
- 
- All Implemented Interfaces:
- Closeable,- AutoCloseable,- Readable
 
 @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.A Reader that reads from a URL. Used to make sure that the reader reads content from given URL and can be trusted to do so.- Since:
- 1.8u40
 
- 
- 
Constructor SummaryConstructors Constructor Description URLReader(URL url)Deprecated, for removal: This API element is subject to removal in a future version.ConstructorURLReader(URL url, String charsetName)Deprecated, for removal: This API element is subject to removal in a future version.ConstructorURLReader(URL url, Charset cs)Deprecated, for removal: This API element is subject to removal in a future version.Constructor
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description CharsetgetCharset()Deprecated, for removal: This API element is subject to removal in a future version.Charset used by this readerURLgetURL()Deprecated, for removal: This API element is subject to removal in a future version.URL of this reader- 
Methods declared in class java.io.Readerclose, mark, markSupported, nullReader, read, read, read, read, ready, reset, skip, transferTo
 
- 
 
- 
- 
- 
Constructor Detail- 
URLReaderpublic URLReader(URL url) Deprecated, for removal: This API element is subject to removal in a future version.Constructor- Parameters:
- url- URL for this URLReader
- Throws:
- NullPointerException- if url is null
 
 - 
URLReaderpublic URLReader(URL url, String charsetName) Deprecated, for removal: This API element is subject to removal in a future version.Constructor- Parameters:
- url- URL for this URLReader
- charsetName- Name of the Charset used to convert bytes to chars
- Throws:
- NullPointerException- if url is null
 
 - 
URLReaderpublic URLReader(URL url, Charset cs) Deprecated, for removal: This API element is subject to removal in a future version.Constructor- Parameters:
- url- URL for this URLReader
- cs- Charset used to convert bytes to chars
- Throws:
- NullPointerException- if url is null
 
 
- 
 - 
Method Detail- 
getURLpublic URL getURL() Deprecated, for removal: This API element is subject to removal in a future version.URL of this reader- Returns:
- the URL from which this reader reads.
 
 - 
getCharsetpublic Charset getCharset() Deprecated, for removal: This API element is subject to removal in a future version.Charset used by this reader- Returns:
- the Charset used to convert bytes to chars
 
 
- 
 
-