|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbiz.c24.io.api.presentation.Source
biz.c24.io.api.presentation.DefaultSource
TextualSource
instead.
public class DefaultSource
Replaced by TextualSource
Constructor Summary | |
---|---|
DefaultSource()
Deprecated. Constructs a new instance. |
|
DefaultSource(DefaultSource clone)
Deprecated. Constructs a new instance cloned from clone . |
|
DefaultSource(InputStream stream)
Deprecated. Constructs a new instance which will read from stream . |
|
DefaultSource(Reader reader)
Deprecated. Constructs a new instance which will read from reader . |
Method Summary | |
---|---|
protected void |
checkInit()
Deprecated. Used by subclasses to ensure a reader or input stream has been set. |
Object |
clone()
Deprecated. |
boolean |
equals(Object obj)
Deprecated. |
String |
getEncoding()
Deprecated. Get the character encoding for a byte stream. |
InputStream |
getInputStream()
Deprecated. Returns the input stream (optional operation). |
int |
getLookAhead()
Deprecated. Returns the maximum number of characters to look ahead. |
int |
getLookBehind()
Deprecated. Returns the maximum number of characters to look behind. |
ParseListener |
getParseListener()
Deprecated. Returns the parse listener that will be notified of batch processing events. |
Reader |
getReader()
Deprecated. Returns the reader (optional operation). |
URI |
getSystemId()
Deprecated. Gets the optional System ID. |
int |
hashCode()
Deprecated. |
boolean |
isEndOfDataRequired()
Deprecated. Returns whether the stream / reader must be emptied for the read to succeed. |
protected Reader |
reader()
Deprecated. Used by subclasses to get a reference to the reader object responsible for reading the data. |
void |
readObject(ComplexDataObject context)
Deprecated. Reads an object from the the reader or input stream that has been set (optional operation). |
ComplexDataObject |
readObject(Element element)
Deprecated. Reads an object from the the reader or input stream that has been set. |
boolean |
ready()
Deprecated. Tests whether the underlying stream or reader contains more data waiting to be parsed. |
void |
setEncoding(String encoding)
Deprecated. Set the character encoding for a byte stream. |
void |
setEndOfDataRequired(boolean endOfDataRequired)
Deprecated. Sets whether the stream / reader must be emptied for the read to succeed. |
void |
setInputStream(InputStream stream)
Deprecated. Sets the input stream (optional operation). |
void |
setInputStream(InputStream stream,
URI systemId)
Deprecated. Sets the input stream and system ID (optional operation). |
void |
setLookAhead(int lookAhead)
Deprecated. Sets the maximum number of characters to look ahead. |
void |
setLookBehind(int lookBehind)
Deprecated. Sets the maximum number of characters to look behind. |
void |
setParseListener(ParseListener listener)
Deprecated. Sets the parse listener that will be notified of batch processing events. |
void |
setReader(Reader reader)
Deprecated. Sets the reader (optional operation). |
void |
setReader(Reader reader,
URI systemId)
Deprecated. Sets the reader (optional operation). |
void |
setSystemId(URI systemId)
Deprecated. Sets the optional System ID. |
protected InputStream |
stream()
Deprecated. Used by subclasses to get a reference to the input stream object responsible for reading the data. |
String |
toString()
Deprecated. |
Methods inherited from class biz.c24.io.api.presentation.Source |
---|
getMarkableInputStream |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DefaultSource()
public DefaultSource(DefaultSource clone)
clone
.
clone
- The instance to clone.public DefaultSource(Reader reader)
reader
.
reader
- The reader to read the data from.public DefaultSource(InputStream stream)
stream
.
stream
- The stream to read the data from.Method Detail |
---|
public int getLookAhead()
public void setLookAhead(int lookAhead)
lookAhead
- The new look ahead value.public int getLookBehind()
public void setLookBehind(int lookBehind)
lookBehind
- The new look behind value.public boolean isEndOfDataRequired()
public void setEndOfDataRequired(boolean endOfDataRequired)
false
(the default) if the readObject method is to be called more
than once on the same stream / reader or if the calling code is not concerend about additional data such as blank
lines. Set this parameter to true
if you are expecting the stream / reader to contain one and only
one data instance.
endOfDataRequired
- Whether an end of data marker is required in the stream / reader.public ComplexDataObject readObject(Element element) throws IOException
Source
readObject
in class Source
element
- The element declaration to which the input data is expected to adhere.
IOException
- If the complete object could not be read for any reason.public void readObject(ComplexDataObject context) throws IOException
Source
readObject
in class Source
context
- The object into which the input data should be parsed.
IOException
- If the complete object could not be read for any reason.public void setReader(Reader reader)
Source
setReader
in class Source
reader
- The new value.public void setReader(Reader reader, URI systemId)
Source
setReader
in class Source
reader
- The new value.systemId
- The system ID identifying the reader.public Reader getReader()
Source
getReader
in class Source
public void setInputStream(InputStream stream)
Source
This method will also clear the system ID.
setInputStream
in class Source
stream
- The new value.public void setInputStream(InputStream stream, URI systemId)
Source
setInputStream
in class Source
stream
- The new value.systemId
- The system ID identifying the stream.public InputStream getInputStream()
Source
getInputStream
in class Source
public void setEncoding(String encoding)
Source
setEncoding
in class Source
encoding
- A string describing the character encoding. If null then UTF-8 will be used by default.public String getEncoding()
Source
getEncoding
in class Source
public URI getSystemId()
Source
getSystemId
in class Source
null
if none has been set.public void setSystemId(URI systemId)
Source
This gives an optional indication as to the location of the underlying stream being read.
setSystemId
in class Source
systemId
- The new value.public boolean ready()
Source
Reader.ready()
and InputStream.available()
since it may need to take into account data which has been buffered by the Source implementation.
ready
in class Source
public ParseListener getParseListener()
Source
getParseListener
in class Source
ParseListener
public void setParseListener(ParseListener listener)
Source
setParseListener
in class Source
listener
- the new listener.ParseListener
protected InputStream stream()
Source
stream
in class Source
protected Reader reader() throws UnsupportedEncodingException
Source
reader
in class Source
UnsupportedEncodingException
- If the encoding is not supported.protected void checkInit()
Source
checkInit
in class Source
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
public String toString()
toString
in class Object
public Object clone()
clone
in class Source
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |