public class StreamSourceDelegate extends Object implements JsonStreamSource
JsonStreamSource.Value
FALSE, NULL, TRUE
Constructor and Description |
---|
StreamSourceDelegate(JsonStreamSource delegate) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
copy(JsonStreamTarget target)
Copy events to given target until
peek() == JsonStreamToken.NONE . |
void |
endArray()
Consume
JsonStreamToken.END_ARRAY token. |
void |
endObject()
Consume
JsonStreamToken.END_OBJECT token. |
int |
getCharacterOffset() |
int |
getColumnNumber() |
int |
getLineNumber() |
String |
getPublicId() |
String |
getSystemId() |
String |
name()
Consume
JsonStreamToken.NAME token. |
JsonStreamToken |
peek()
Peek next token.
|
void |
startArray()
Consume
JsonStreamToken.START_ARRAY token. |
void |
startObject()
Consume
JsonStreamToken.START_OBJECT token. |
JsonStreamSource.Value |
value()
Consume
JsonStreamToken.VALUE token. |
public StreamSourceDelegate(JsonStreamSource delegate)
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public int getLineNumber()
getLineNumber
in interface Location
public int getColumnNumber()
getColumnNumber
in interface Location
public String name() throws IOException
JsonStreamSource
JsonStreamToken.NAME
token.name
in interface JsonStreamSource
IOException
public int getCharacterOffset()
getCharacterOffset
in interface Location
public JsonStreamSource.Value value() throws IOException
JsonStreamSource
JsonStreamToken.VALUE
token.value
in interface JsonStreamSource
IOException
public void startObject() throws IOException
JsonStreamSource
JsonStreamToken.START_OBJECT
token.startObject
in interface JsonStreamSource
IOException
public String getPublicId()
getPublicId
in interface Location
public void endObject() throws IOException
JsonStreamSource
JsonStreamToken.END_OBJECT
token.endObject
in interface JsonStreamSource
IOException
public String getSystemId()
getSystemId
in interface Location
public void startArray() throws IOException
JsonStreamSource
JsonStreamToken.START_ARRAY
token.startArray
in interface JsonStreamSource
IOException
public void endArray() throws IOException
JsonStreamSource
JsonStreamToken.END_ARRAY
token.endArray
in interface JsonStreamSource
IOException
public JsonStreamToken peek() throws IOException
JsonStreamSource
peek
in interface JsonStreamSource
IOException
public void copy(JsonStreamTarget target) throws IOException
peek() == JsonStreamToken.NONE
.
This method does not close streams.target
- IOException
Copyright © 2005–2020 Apache Software Foundation. All rights reserved.