Package org.apache.maven.building
Class UrlSource
java.lang.Object
org.apache.maven.building.UrlSource
- All Implemented Interfaces:
Source
Wraps an ordinary
URL
as a source.-
Constructor Details
-
UrlSource
Creates a new source backed by the specified URL.- Parameters:
url
- The file, must not benull
.
-
-
Method Details
-
getInputStream
Description copied from interface:Source
Gets a byte stream to the source contents. Closing the returned stream is the responsibility of the caller.- Specified by:
getInputStream
in interfaceSource
- Returns:
- A byte stream to the source contents, never
null
. - Throws:
IOException
- in case of IO issue
-
getLocation
Description copied from interface:Source
Provides a user-friendly hint about the location of the source. This could be a local file path, a URI or just an empty string. The intention is to assist users during error reporting.- Specified by:
getLocation
in interfaceSource
- Returns:
- A user-friendly hint about the location of the source, never
null
.
-
getUrl
Gets the URL of this source.- Returns:
- The underlying URL, never
null
.
-
toString
-
hashCode
public int hashCode() -
equals
-