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
IOException
public ChromeTraceWriter(com.fasterxml.jackson.core.JsonGenerator jsonGenerator)
public void writeEvent(ChromeTraceEvent chromeTraceEvent) throws IOException
IOException
public void writeStart() throws IOException
IOException
public void writeEnd() throws IOException
IOException
public void close() throws IOException
close
in interface AutoCloseable
IOException