public class ChromeTraceWriter extends Object implements AutoCloseable
ChromeTraceEvent| Constructor and Description |
|---|
ChromeTraceWriter(com.fasterxml.jackson.core.JsonGenerator jsonGenerator)
Create a writer backed by specified json generator.
|
ChromeTraceWriter(OutputStream traceStream)
Create a writer backed by specified output stream.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the underlying json generator.
|
void |
writeEnd()
Must be called after all events to properly terminate event stream.
|
void |
writeEvent(ChromeTraceEvent chromeTraceEvent)
Write single event.
|
void |
writeStart()
Must be called prior to emitting first event to properly initialize stream.
|
public ChromeTraceWriter(OutputStream traceStream) throws IOException
IOExceptionpublic ChromeTraceWriter(com.fasterxml.jackson.core.JsonGenerator jsonGenerator)
public void writeEvent(ChromeTraceEvent chromeTraceEvent) throws IOException
IOExceptionpublic void writeStart()
throws IOException
IOExceptionpublic void writeEnd()
throws IOException
IOExceptionpublic void close()
throws IOException
close in interface AutoCloseableIOException