|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ckkloverdos.source.SourceSkeleton
org.ckkloverdos.source.StringSource
public class StringSource
A ISource
whose contents come directly from a string.
The source is valid iff the underlying string is not null
.
Field Summary |
---|
Fields inherited from class org.ckkloverdos.source.SourceSkeleton |
---|
is, name, type, valid |
Constructor Summary | |
---|---|
StringSource(java.lang.String name,
SourceType type,
java.lang.String theString)
|
|
StringSource(java.lang.String name,
SourceType type,
java.lang.StringBuffer theString)
|
Method Summary | |
---|---|
java.io.InputStream |
getInputStream()
Returns an input stream obtained from the UTF8 representation of the underlying string. |
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. |
Methods inherited from class org.ckkloverdos.source.SourceSkeleton |
---|
getDescription, getName, getType, isText, isValid, setInputStream, setName, setType, setValid |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StringSource(java.lang.String name, SourceType type, java.lang.String theString)
public StringSource(java.lang.String name, SourceType type, java.lang.StringBuffer theString)
Method Detail |
---|
public java.io.Reader getReader() throws java.io.UnsupportedEncodingException
ISource
StringUtil.UTF8
encoding.
getReader
in interface ISource
getReader
in class SourceSkeleton
java.io.UnsupportedEncodingException
public java.io.Reader getReader(java.lang.String encoding) throws java.io.IOException
ISource
encoding
.
getReader
in interface ISource
getReader
in class SourceSkeleton
java.io.IOException
public java.lang.String getString() throws java.io.IOException
ISource
StringUtil.UTF8
encoding.
getString
in interface ISource
getString
in class SourceSkeleton
java.io.IOException
public java.lang.String getString(java.lang.String encoding) throws java.io.IOException
ISource
encoding
.
getString
in interface ISource
getString
in class SourceSkeleton
java.io.IOException
public java.io.InputStream getInputStream() throws java.io.IOException
getInputStream
in interface ISource
getInputStream
in class SourceSkeleton
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |