biz.c24.io.api.presentation
Class DefaultSource

java.lang.Object
  extended by biz.c24.io.api.presentation.Source
      extended by biz.c24.io.api.presentation.DefaultSource
All Implemented Interfaces:
Serializable, Cloneable

Deprecated. Use TextualSource instead.

public class DefaultSource
extends Source

Replaced by TextualSource

See Also:
Serialized Form

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

DefaultSource

public DefaultSource()
Deprecated. 
Constructs a new instance.


DefaultSource

public DefaultSource(DefaultSource clone)
Deprecated. 
Constructs a new instance cloned from clone.

Parameters:
clone - The instance to clone.

DefaultSource

public DefaultSource(Reader reader)
Deprecated. 
Constructs a new instance which will read from reader.

Parameters:
reader - The reader to read the data from.

DefaultSource

public DefaultSource(InputStream stream)
Deprecated. 
Constructs a new instance which will read from stream.

Parameters:
stream - The stream to read the data from.
Method Detail

getLookAhead

public int getLookAhead()
Deprecated. 
Returns the maximum number of characters to look ahead. This parameter controls the maximum buffer size beyond the current offset.

Returns:
The look ahead value.

setLookAhead

public void setLookAhead(int lookAhead)
Deprecated. 
Sets the maximum number of characters to look ahead.

Parameters:
lookAhead - The new look ahead value.

getLookBehind

public int getLookBehind()
Deprecated. 
Returns the maximum number of characters to look behind. This paraemter controls the maximum buffer size upto the current offset.

Returns:
The look behind value.

setLookBehind

public void setLookBehind(int lookBehind)
Deprecated. 
Sets the maximum number of characters to look behind.

Parameters:
lookBehind - The new look behind value.

isEndOfDataRequired

public boolean isEndOfDataRequired()
Deprecated. 
Returns whether the stream / reader must be emptied for the read to succeed.

Returns:
Whether an end of data marker is required in the stream / reader.

setEndOfDataRequired

public void setEndOfDataRequired(boolean endOfDataRequired)
Deprecated. 
Sets whether the stream / reader must be emptied for the read to succeed. This parameter should be set to 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.

Parameters:
endOfDataRequired - Whether an end of data marker is required in the stream / reader.

readObject

public ComplexDataObject readObject(Element element)
                             throws IOException
Deprecated. 
Description copied from class: Source
Reads an object from the the reader or input stream that has been set.

Specified by:
readObject in class Source
Parameters:
element - The element declaration to which the input data is expected to adhere.
Returns:
The newly created object.
Throws:
IOException - If the complete object could not be read for any reason.

readObject

public void readObject(ComplexDataObject context)
                throws IOException
Deprecated. 
Description copied from class: Source
Reads an object from the the reader or input stream that has been set (optional operation).

Specified by:
readObject in class Source
Parameters:
context - The object into which the input data should be parsed.
Throws:
IOException - If the complete object could not be read for any reason.

setReader

public void setReader(Reader reader)
Deprecated. 
Description copied from class: Source
Sets the reader (optional operation). This method will also clear the system ID.

Overrides:
setReader in class Source
Parameters:
reader - The new value.

setReader

public void setReader(Reader reader,
                      URI systemId)
Deprecated. 
Description copied from class: Source
Sets the reader (optional operation).

Overrides:
setReader in class Source
Parameters:
reader - The new value.
systemId - The system ID identifying the reader.

getReader

public Reader getReader()
Deprecated. 
Description copied from class: Source
Returns the reader (optional operation).

Overrides:
getReader in class Source
Returns:
The reader.

setInputStream

public void setInputStream(InputStream stream)
Deprecated. 
Description copied from class: Source
Sets the input stream (optional operation).

This method will also clear the system ID.

Overrides:
setInputStream in class Source
Parameters:
stream - The new value.

setInputStream

public void setInputStream(InputStream stream,
                           URI systemId)
Deprecated. 
Description copied from class: Source
Sets the input stream and system ID (optional operation).

Overrides:
setInputStream in class Source
Parameters:
stream - The new value.
systemId - The system ID identifying the stream.

getInputStream

public InputStream getInputStream()
Deprecated. 
Description copied from class: Source
Returns the input stream (optional operation).

Overrides:
getInputStream in class Source
Returns:
The stream.

setEncoding

public void setEncoding(String encoding)
Deprecated. 
Description copied from class: Source
Set the character encoding for a byte stream. This method has no effect when the application provides a writer or when a source instance load binary data.

Overrides:
setEncoding in class Source
Parameters:
encoding - A string describing the character encoding. If null then UTF-8 will be used by default.

getEncoding

public String getEncoding()
Deprecated. 
Description copied from class: Source
Get the character encoding for a byte stream. This value will be ignored when the application provides a writer or when a source instance load binary data.

Overrides:
getEncoding in class Source
Returns:
The encoding, or null if none was supplied.

getSystemId

public URI getSystemId()
Deprecated. 
Description copied from class: Source
Gets the optional System ID.

Overrides:
getSystemId in class Source
Returns:
The system ID, or null if none has been set.

setSystemId

public void setSystemId(URI systemId)
Deprecated. 
Description copied from class: Source
Sets the optional System ID.

This gives an optional indication as to the location of the underlying stream being read.

Overrides:
setSystemId in class Source
Parameters:
systemId - The new value.

ready

public boolean ready()
Deprecated. 
Description copied from class: Source
Tests whether the underlying stream or reader contains more data waiting to be parsed.
This method should be called in preference to Reader.ready() and InputStream.available() since it may need to take into account data which has been buffered by the Source implementation.

Overrides:
ready in class Source
Returns:
Whether there is unparsed data available.

getParseListener

public ParseListener getParseListener()
Deprecated. 
Description copied from class: Source
Returns the parse listener that will be notified of batch processing events.

Overrides:
getParseListener in class Source
Returns:
the parse listener.
See Also:
ParseListener

setParseListener

public void setParseListener(ParseListener listener)
Deprecated. 
Description copied from class: Source
Sets the parse listener that will be notified of batch processing events.

Overrides:
setParseListener in class Source
Parameters:
listener - the new listener.
See Also:
ParseListener

stream

protected InputStream stream()
Deprecated. 
Description copied from class: Source
Used by subclasses to get a reference to the input stream object responsible for reading the data.

Overrides:
stream in class Source
Returns:
The input stream.

reader

protected Reader reader()
                 throws UnsupportedEncodingException
Deprecated. 
Description copied from class: Source
Used by subclasses to get a reference to the reader object responsible for reading the data.

Overrides:
reader in class Source
Returns:
The reader.
Throws:
UnsupportedEncodingException - If the encoding is not supported.

checkInit

protected void checkInit()
Deprecated. 
Description copied from class: Source
Used by subclasses to ensure a reader or input stream has been set.

Overrides:
checkInit in class Source

hashCode

public int hashCode()
Deprecated. 
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Deprecated. 
Overrides:
equals in class Object

toString

public String toString()
Deprecated. 
Overrides:
toString in class Object

clone

public Object clone()
Deprecated. 
Specified by:
clone in class Source


C24 Technologies © 2002-2012: All Rights Reserved.