public class JsonTraceCodec extends java.lang.Object implements TraceCodec
TraceCodec
Constructor and Description |
---|
JsonTraceCodec() |
Modifier and Type | Method and Description |
---|---|
Trace |
decode(java.io.InputStream inputStream)
Decode the InputStream to an Trace.
|
Trace |
decode(java.lang.String traceStr)
Similar to
TraceCodec.decode(java.io.InputStream) but takes a String instead
of an InputStream. |
java.lang.String |
encode(Trace trace)
Similar to
TraceCodec.encode(com.linkedin.parseq.trace.Trace, java.io.OutputStream)
but produces a String that contains the trace instead of writing it to an
OutputStream. |
void |
encode(Trace trace,
java.io.OutputStream outputStream)
Encodes a Trace to an OutputStream.
|
public Trace decode(java.io.InputStream inputStream) throws java.io.IOException
TraceCodec
decode
in interface TraceCodec
inputStream
- the InputStream of the TaskTracejava.io.IOException
- if an error occur during decodingpublic Trace decode(java.lang.String traceStr) throws java.io.IOException
TraceCodec
TraceCodec.decode(java.io.InputStream)
but takes a String instead
of an InputStream.decode
in interface TraceCodec
traceStr
- a String representation of a Tracejava.io.IOException
- if an error occur during decodingpublic void encode(Trace trace, java.io.OutputStream outputStream) throws java.io.IOException
TraceCodec
encode
in interface TraceCodec
trace
- the Trace to encodeoutputStream
- the OutputStream used to encodejava.io.IOException
- if an error occurs during encodingpublic java.lang.String encode(Trace trace) throws java.io.IOException
TraceCodec
TraceCodec.encode(com.linkedin.parseq.trace.Trace, java.io.OutputStream)
but produces a String that contains the trace instead of writing it to an
OutputStream.encode
in interface TraceCodec
trace
- the Trace to encodejava.io.IOException
- if an error occurs during encoding