public class DefaultInputSupplier extends Object implements LocatableInputSupplier<InputStream>
Modifier and Type | Field and Description |
---|---|
static String |
SCHEME_LOCAL
Name of the scheme where resolving locally through
Resources is
preferred. |
Constructor and Description |
---|
DefaultInputSupplier(URI location)
Create a default I/O supplier based on the given URI
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
InputStream |
getInput() |
URI |
getLocation()
Get the location
|
URI |
getUsedLocation()
Returns the used location, which may be relative.
|
int |
hashCode() |
protected InputStream |
resolve(URI location)
Resolve the given location and open an input stream.
|
public static final String SCHEME_LOCAL
Resources
is
preferred.public DefaultInputSupplier(URI location)
location
- the location URIpublic InputStream getInput() throws IOException
getInput
in interface com.google.common.io.InputSupplier<InputStream>
IOException
InputSupplier.getInput()
protected InputStream resolve(URI location) throws IOException
location
- the locationIOException
- if an error occurs opening the streampublic URI getLocation()
Locatable
getLocation
in interface Locatable
null
Locatable.getLocation()
public int hashCode()
hashCode
in class Object
Object.hashCode()
public boolean equals(Object obj)
equals
in class Object
Object.equals(java.lang.Object)
public URI getUsedLocation()
LocatableInputSupplier
getUsedLocation
in interface LocatableInputSupplier<InputStream>
Locatable.getLocation()
, or
a relative URIBuild 2013-10-07_11-27-38
Revision 99b27713a799a59a21b0b166eaaea8aaefbf125a