< prev index next >
src/jdk/nashorn/api/scripting/URLReader.java
Print this page
*** 76,87 ****
* @param url URL for this URLReader
* @param cs Charset used to convert bytes to chars
* @throws NullPointerException if url is null
*/
public URLReader(final URL url, final Charset cs) {
! Objects.requireNonNull(url);
! this.url = url;
this.cs = cs;
}
@Override
public int read(final char cbuf[], final int off, final int len) throws IOException {
--- 76,86 ----
* @param url URL for this URLReader
* @param cs Charset used to convert bytes to chars
* @throws NullPointerException if url is null
*/
public URLReader(final URL url, final Charset cs) {
! this.url = Objects.requireNonNull(url);
this.cs = cs;
}
@Override
public int read(final char cbuf[], final int off, final int len) throws IOException {
< prev index next >