|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ckkloverdos.source.SourceSkeleton
public abstract class SourceSkeleton
Basic, InputStream- based implementation of ISource,
intended to be subclassed.
| Field Summary | |
|---|---|
protected java.io.InputStream |
is
|
protected java.lang.String |
name
|
protected SourceType |
type
|
protected boolean |
valid
|
| Constructor Summary | |
|---|---|
protected |
SourceSkeleton()
|
protected |
SourceSkeleton(java.lang.String name,
SourceType type,
java.io.InputStream is)
|
| Method Summary | |
|---|---|
java.lang.String |
getDescription()
Return the description of this source. |
java.io.InputStream |
getInputStream()
Get an input stream for this source. |
java.lang.String |
getName()
Return the name of this source. |
java.io.Reader |
getReader()
Get a reader for the contents of this source. |
java.io.Reader |
getReader(java.lang.String encoding)
Get a reader for the contents of this source. |
java.lang.String |
getString()
Get a string from the contents of this source. |
java.lang.String |
getString(java.lang.String encoding)
Get a string from the contents of this source. |
SourceType |
getType()
Return the type of this source. |
boolean |
isText()
Return true if the type of this source is text. |
boolean |
isValid()
Return true iff any of the ISource.getInputStream(),
ISource.getString(), ISource.getReader() methods will return
a non-null object. |
protected void |
setInputStream(java.io.InputStream is)
|
protected void |
setName(java.lang.String name)
|
protected void |
setType(SourceType type)
|
protected void |
setValid(boolean valid)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String name
protected SourceType type
protected java.io.InputStream is
protected boolean valid
| Constructor Detail |
|---|
protected SourceSkeleton()
protected SourceSkeleton(java.lang.String name,
SourceType type,
java.io.InputStream is)
| Method Detail |
|---|
public boolean isValid()
ISourcetrue iff any of the ISource.getInputStream(),
ISource.getString(), ISource.getReader() methods will return
a non-null object.
isValid in interface ISourcepublic java.lang.String getName()
ISource
getName in interface ISourcepublic java.lang.String getDescription()
ISource
getDescription in interface ISourcepublic SourceType getType()
ISourcetype of this source.
getType in interface ISource
public java.io.InputStream getInputStream()
throws java.io.IOException
ISource
getInputStream in interface ISourcejava.io.IOExceptionpublic boolean isText()
ISourcetrue if the type of this source is text.
isText in interface ISourcetrue iff getType().isText() returns true.
public java.lang.String getString()
throws java.io.IOException
ISourceStringUtil.UTF8
encoding.
getString in interface ISourcejava.io.IOException
public java.io.Reader getReader()
throws java.io.IOException
ISourceStringUtil.UTF8
encoding.
getReader in interface ISourcejava.io.IOException
public java.lang.String getString(java.lang.String encoding)
throws java.io.IOException
ISourceencoding.
getString in interface ISourcejava.io.IOException
public java.io.Reader getReader(java.lang.String encoding)
throws java.io.IOException
ISourceencoding.
getReader in interface ISourcejava.io.IOExceptionprotected void setValid(boolean valid)
protected void setInputStream(java.io.InputStream is)
protected void setName(java.lang.String name)
protected void setType(SourceType type)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||