biz.c24.io.api.presentation
Class JsonSource

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

public final class JsonSource
extends Source

Take a JSON message from a Reader or a Stream and write-out an object model hierarchy as defined by the ComplexDataObject type.

See Also:
Serialized Form

Field Summary
static String PARSED_VALUE_AND_TYPE_MISMATCH_ERROR
           
 
Constructor Summary
JsonSource()
           
JsonSource(InputStream stream)
           
JsonSource(JsonSource jsonSource)
           
JsonSource(Reader reader)
           
 
Method Summary
 Object clone()
           
 void readObject(ComplexDataObject cdo)
          Reads an object from the the reader or input stream that has been set (optional operation).
 ComplexDataObject readObject(Element element)
          Reads an object from the the reader or input stream that has been set.
 
Methods inherited from class biz.c24.io.api.presentation.Source
checkInit, getEncoding, getInputStream, getMarkableInputStream, getParseListener, getReader, getSystemId, reader, ready, setEncoding, setInputStream, setInputStream, setParseListener, setReader, setReader, setSystemId, stream
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARSED_VALUE_AND_TYPE_MISMATCH_ERROR

public static final String PARSED_VALUE_AND_TYPE_MISMATCH_ERROR
See Also:
Constant Field Values
Constructor Detail

JsonSource

public JsonSource()

JsonSource

public JsonSource(InputStream stream)

JsonSource

public JsonSource(JsonSource jsonSource)

JsonSource

public JsonSource(Reader reader)
Method Detail

clone

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

readObject

public void readObject(ComplexDataObject cdo)
                throws IOException
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:
cdo - The object into which the input data should be parsed.
Throws:
IOException - If the complete object could not be read for any reason.

readObject

public ComplexDataObject readObject(Element element)
                             throws IOException
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.


C24 Technologies © 2002-2012: All Rights Reserved.