public class AdapterInputSource
extends java.lang.Object
Constructor and Description |
---|
AdapterInputSource(java.io.File file)
Ctor.
|
AdapterInputSource(java.io.InputStream inputStream)
Ctor.
|
AdapterInputSource(java.io.Reader reader)
Ctor.
|
AdapterInputSource(java.lang.String classpathResource)
Ctor.
|
AdapterInputSource(java.net.URL url)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
java.io.Reader |
getAsReader()
Return the reader if it was set, null otherwise.
|
java.io.InputStream |
getAsStream()
Get the resource as an input stream.
|
boolean |
isResettable()
Return true if calling getStream() will return a new InputStream created from the
resource, which, assuming that the resource hasn't been changed, will have the same
information as all the previous InputStreams returned by getStream() before they were
manipulated; return false if the call will return the same instance of InputStream that
has already been obtained.
|
public AdapterInputSource(java.lang.String classpathResource)
classpathResource
- - the name of the resource on the classpath to use as the source for an adapterpublic AdapterInputSource(java.net.URL url)
url
- - the URL for the resource to use as source for an adapterpublic AdapterInputSource(java.io.File file)
file
- - the file to use as a sourcepublic AdapterInputSource(java.io.InputStream inputStream)
inputStream
- - the stream to use as a sourcepublic AdapterInputSource(java.io.Reader reader)
reader
- is any reader for reading a file or stringpublic java.io.InputStream getAsStream()
public java.io.Reader getAsReader()
public boolean isResettable()
public void close()