Home > Contents > Index >
Expanded TOC | Accordion TOC | Annotated TOC | Index
Utilities.readURL
Reads the passed URL, and returns its contents as a string.
Syntax
public static final String readURL(String url)Parameters
url
- The URL to read, for example,
"http://www.oracle.com/".
Description
The
readURL
method reads the passed URL, and returns its contents as a string. This method strips out characters returned byCharacter.isIdentifierIgnorable()
.Returns
The contents of the URL in a string, or null.
Example
The following code writes the contents of
www.oracle.com
into variablestrURL
:
String strURL = Utilities.readURL("http://www.oracle.com/");See Also
readByteFile
Home > Contents > Index > Oracle JAVA Reference
Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.