public class IpcAnyWriter
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ENCODING
Encoding to use for String (de)serialization.
|
Constructor and Description |
---|
IpcAnyWriter() |
IpcAnyWriter(boolean printPretty) |
Modifier and Type | Method and Description |
---|---|
byte[] |
writeBinaryObject(Any any) |
void |
writeBinaryStream(Any any,
java.io.OutputStream stream) |
java.lang.String |
writeJsonObject(Any any) |
void |
writeJsonStream(Any any,
java.io.OutputStream stream) |
void |
writeStream(Any any,
IpcStreamWriter writer) |
public static final java.lang.String ENCODING
public IpcAnyWriter()
public IpcAnyWriter(boolean printPretty)
printPretty
- whether JSON output should be formatted.public byte[] writeBinaryObject(Any any) throws java.io.IOException
any
- input Any objectjava.io.IOException
public void writeBinaryStream(Any any, java.io.OutputStream stream) throws java.io.IOException
any
- inputstream
- stream to write the output in BON format.java.io.IOException
public java.lang.String writeJsonObject(Any any) throws java.io.IOException
any
- input Any objectjava.io.IOException
public void writeJsonStream(Any any, java.io.OutputStream stream) throws java.io.IOException
any
- inputstream
- stream to write the output as JSON.java.io.IOException
public void writeStream(Any any, IpcStreamWriter writer) throws java.io.IOException
any
- inputwriter
- writer with an underlying stream to write the ouput to.java.io.IOException