SMILA 1.0 API documentation

org.eclipse.smila.ipc.json
Class JsonFactory

java.lang.Object
  extended by org.eclipse.smila.ipc.json.JsonFactory
All Implemented Interfaces:
IpcFactory

public class JsonFactory
extends java.lang.Object
implements IpcFactory

Factory for stream readers/writers using JSON.

Author:
aweber

Constructor Summary
JsonFactory()
          create instance with pretty-printing enabled.
JsonFactory(boolean printPretty)
          create instance with specified pretty-printing option.
 
Method Summary
 JsonStreamReader newStreamReader(java.io.InputStream stream)
          Create a new JSON stream reader.
 JsonStreamWriter newStreamWriter(java.io.OutputStream stream)
          Create a new JSON stream writer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JsonFactory

public JsonFactory()
create instance with pretty-printing enabled.


JsonFactory

public JsonFactory(boolean printPretty)
create instance with specified pretty-printing option.

Method Detail

newStreamReader

public JsonStreamReader newStreamReader(java.io.InputStream stream)
                                 throws java.io.IOException
Create a new JSON stream reader. create a new IPC stream writer.

Specified by:
newStreamReader in interface IpcFactory
Parameters:
stream - stream to write
Returns:
stream writer
Throws:
java.io.IOException - error creating or initializing the reader.

newStreamWriter

public JsonStreamWriter newStreamWriter(java.io.OutputStream stream)
                                 throws java.io.IOException
Create a new JSON stream writer. create a new IPC stream reader.

Specified by:
newStreamWriter in interface IpcFactory
Parameters:
stream - stream to read
Returns:
stream writer.
Throws:
java.io.IOException - error creating or initializing the writer.

SMILA 1.0 API documentation