SMILA (incubation) API documentation

org.eclipse.smila.ipc
Interface IpcStreamWriter

All Known Implementing Classes:
JsonStreamWriter

public interface IpcStreamWriter

Streaming API based writer for the IPC protocol.

Author:
aweber

Method Summary
 void close()
          Closes the writer and the underlying stream.
 void closeWithoutStream()
          Closes the writer but NOT the underlying stream.
 void writeMappingEnd()
          Writes marker signaling end of a mapping.
 void writeMappingKey(java.lang.String s)
          Writes a mapping key.
 void writeMappingStart()
          Writes marker signaling start of a mapping.
 void writeObjectEnd()
          Writes marker signaling end of an object (resp.
 void writeObjectStart()
          Writes marker signaling start of an object (resp.
 void writeScalarBoolean(boolean b)
          Writes boolean value.
 void writeScalarDouble(double d)
          Writes double value.
 void writeScalarInt(int i)
          Writes integer value.
 void writeScalarLong(long i)
          Writes long value.
 void writeScalarString(java.lang.String s)
          Writes string value.
 void writeSequenceEnd()
          Writes marker signaling end of a sequence.
 void writeSequenceStart()
          Writes marker signaling start of a sequence.
 

Method Detail

close

void close()
           throws java.io.IOException
Closes the writer and the underlying stream.

Throws:
java.io.IOException - any error

closeWithoutStream

void closeWithoutStream()
                        throws java.io.IOException
Closes the writer but NOT the underlying stream.

Throws:
java.io.IOException - any error

writeObjectStart

void writeObjectStart()
                      throws java.io.IOException
Writes marker signaling start of an object (resp. a document). Will be ignored if underlying implementation doesn't support this kind of marker.

Throws:
java.io.IOException - any error

writeObjectEnd

void writeObjectEnd()
                    throws java.io.IOException
Writes marker signaling end of an object (resp. a document). Will be ignored if underlying implementation doesn't support this kind of marker.

Throws:
java.io.IOException - any error

writeMappingStart

void writeMappingStart()
                       throws java.io.IOException
Writes marker signaling start of a mapping.

Throws:
java.io.IOException - any error

writeMappingEnd

void writeMappingEnd()
                     throws java.io.IOException
Writes marker signaling end of a mapping.

Throws:
java.io.IOException - any error

writeSequenceStart

void writeSequenceStart()
                        throws java.io.IOException
Writes marker signaling start of a sequence.

Throws:
java.io.IOException - any error

writeSequenceEnd

void writeSequenceEnd()
                      throws java.io.IOException
Writes marker signaling end of a sequence.

Throws:
java.io.IOException - any error

writeScalarString

void writeScalarString(java.lang.String s)
                       throws java.io.IOException
Writes string value.

Parameters:
s - value to write
Throws:
java.io.IOException - any error

writeScalarInt

void writeScalarInt(int i)
                    throws java.io.IOException
Writes integer value.

Parameters:
i - value to write
Throws:
java.io.IOException - any error

writeScalarLong

void writeScalarLong(long i)
                     throws java.io.IOException
Writes long value.

Parameters:
i - value to write
Throws:
java.io.IOException - any error

writeScalarDouble

void writeScalarDouble(double d)
                       throws java.io.IOException
Writes double value.

Parameters:
d - value to write
Throws:
java.io.IOException - any error

writeScalarBoolean

void writeScalarBoolean(boolean b)
                        throws java.io.IOException
Writes boolean value. any error

Parameters:
b - value to write
Throws:
java.io.IOException - any error

writeMappingKey

void writeMappingKey(java.lang.String s)
                     throws java.io.IOException
Writes a mapping key. Depending on the underlying implementation there may be no difference to just writing a scalar string. But e.g. in JSON keys are completed by an additional ":".

Parameters:
s - value to write
Throws:
java.io.IOException - any error

SMILA (incubation) API documentation