public class ReadableOnceConfigSourceJ extends ConfigSourceJ
Constructor and Description |
---|
ReadableOnceConfigSourceJ(java.io.InputStream in,
java.lang.String name)
Sources configuration data from an input stream that will be read once only then closed.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canBeOpened()
Tests whether this source can be opened [again].
|
long |
lastModifiedTime()
Provides the timestamp so that source file changes can be observed.
|
java.lang.String |
name()
The file name or similar that identifies the underlying resource.
|
protected java.io.InputStream |
openTheSource()
Implementations must provide the means to open their input stream in the necessary way.
|
open, timesOpened
public ReadableOnceConfigSourceJ(java.io.InputStream in, java.lang.String name)
in
- the input stream to be consumedname
- a name that will be used in error messages (any string)public long lastModifiedTime()
ConfigSourceJ
lastModifiedTime
in class ConfigSourceJ
public boolean canBeOpened()
ConfigSourceJ
canBeOpened
in class ConfigSourceJ
protected java.io.InputStream openTheSource()
ConfigSourceJ
openTheSource
in class ConfigSourceJ
public java.lang.String name()
ConfigSourceJ
name
in class ConfigSourceJ