Modifier and Type | Method and Description |
---|---|
void |
close() |
static @NonNull JsonParserStream |
create(@NonNull NormalizedNodeStreamWriter writer,
@NonNull JSONCodecFactory codecFactory)
|
static @NonNull JsonParserStream |
create(@NonNull NormalizedNodeStreamWriter writer,
@NonNull JSONCodecFactory codecFactory,
@NonNull SchemaNode parentNode)
|
void |
flush() |
JsonParserStream |
parse(com.google.gson.stream.JsonReader reader) |
void |
read(com.google.gson.stream.JsonReader in,
AbstractNodeDataWithSchema<?> parent) |
public static @NonNull JsonParserStream create(@NonNull NormalizedNodeStreamWriter writer, @NonNull JSONCodecFactory codecFactory)
JsonParserStream
backed by specified NormalizedNodeStreamWriter
and JSONCodecFactory
. The stream will be logically rooted at the top of the SchemaContext associated
with the specified codec factory.writer
- NormalizedNodeStreamWriter to use for instantiation of normalized nodescodecFactory
- JSONCodecFactory
to use for parsing leavesJsonParserStream
NullPointerException
- if any of the arguments are nullpublic static @NonNull JsonParserStream create(@NonNull NormalizedNodeStreamWriter writer, @NonNull JSONCodecFactory codecFactory, @NonNull SchemaNode parentNode)
JsonParserStream
backed by specified NormalizedNodeStreamWriter
and JSONCodecFactory
. The stream will be logically rooted at the specified parent node.writer
- NormalizedNodeStreamWriter to use for instantiation of normalized nodescodecFactory
- JSONCodecFactory
to use for parsing leavesparentNode
- Logical root nodeJsonParserStream
NullPointerException
- if any of the arguments are nullpublic JsonParserStream parse(com.google.gson.stream.JsonReader reader)
public void read(com.google.gson.stream.JsonReader in, AbstractNodeDataWithSchema<?> parent) throws IOException
IOException
public void flush() throws IOException
flush
in interface Flushable
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2019 OpenDaylight. All rights reserved.