public class UrlSource extends Object implements Source
URL
as a source.Constructor and Description |
---|
UrlSource(URL url)
Creates a new source backed by the specified URL.
|
Modifier and Type | Method and Description |
---|---|
InputStream |
getInputStream()
Gets a byte stream to the source contents.
|
String |
getLocation()
Provides a user-friendly hint about the location of the source.
|
URL |
getUrl()
Gets the URL of this source.
|
String |
toString() |
public UrlSource(URL url)
url
- The file, must not be null
.public InputStream getInputStream() throws IOException
Source
getInputStream
in interface Source
null
.IOException
public String getLocation()
Source
getLocation
in interface Source
null
.public URL getUrl()
null
.Copyright © 2001–2018 The Apache Software Foundation. All rights reserved.