Class StreamSourceDelegate
- java.lang.Object
-
- org.apache.synapse.commons.staxon.core.json.stream.util.StreamSourceDelegate
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Location
,JsonStreamSource
- Direct Known Subclasses:
AddRootSource
public class StreamSourceDelegate extends Object implements JsonStreamSource
Delegating stream source.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.synapse.commons.staxon.core.json.stream.JsonStreamSource
JsonStreamSource.Value
-
-
Field Summary
-
Fields inherited from interface org.apache.synapse.commons.staxon.core.json.stream.JsonStreamSource
FALSE, NULL, TRUE
-
-
Constructor Summary
Constructors Constructor Description StreamSourceDelegate(JsonStreamSource delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
copy(JsonStreamTarget target)
Copy events to given target untilpeek() == JsonStreamToken.NONE
.void
endArray()
ConsumeJsonStreamToken.END_ARRAY
token.void
endObject()
ConsumeJsonStreamToken.END_OBJECT
token.int
getCharacterOffset()
int
getColumnNumber()
int
getLineNumber()
String
getPublicId()
String
getSystemId()
String
name()
ConsumeJsonStreamToken.NAME
token.JsonStreamToken
peek()
Peek next token.void
startArray()
ConsumeJsonStreamToken.START_ARRAY
token.void
startObject()
ConsumeJsonStreamToken.START_OBJECT
token.JsonStreamSource.Value
value()
ConsumeJsonStreamToken.VALUE
token.
-
-
-
Constructor Detail
-
StreamSourceDelegate
public StreamSourceDelegate(JsonStreamSource delegate)
-
-
Method Detail
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
getLineNumber
public int getLineNumber()
- Specified by:
getLineNumber
in interfaceLocation
-
getColumnNumber
public int getColumnNumber()
- Specified by:
getColumnNumber
in interfaceLocation
-
name
public String name() throws IOException
Description copied from interface:JsonStreamSource
ConsumeJsonStreamToken.NAME
token.- Specified by:
name
in interfaceJsonStreamSource
- Returns:
- name
- Throws:
IOException
-
getCharacterOffset
public int getCharacterOffset()
- Specified by:
getCharacterOffset
in interfaceLocation
-
value
public JsonStreamSource.Value value() throws IOException
Description copied from interface:JsonStreamSource
ConsumeJsonStreamToken.VALUE
token.- Specified by:
value
in interfaceJsonStreamSource
- Returns:
- value
- Throws:
IOException
-
startObject
public void startObject() throws IOException
Description copied from interface:JsonStreamSource
ConsumeJsonStreamToken.START_OBJECT
token.- Specified by:
startObject
in interfaceJsonStreamSource
- Throws:
IOException
-
getPublicId
public String getPublicId()
- Specified by:
getPublicId
in interfaceLocation
-
endObject
public void endObject() throws IOException
Description copied from interface:JsonStreamSource
ConsumeJsonStreamToken.END_OBJECT
token.- Specified by:
endObject
in interfaceJsonStreamSource
- Throws:
IOException
-
getSystemId
public String getSystemId()
- Specified by:
getSystemId
in interfaceLocation
-
startArray
public void startArray() throws IOException
Description copied from interface:JsonStreamSource
ConsumeJsonStreamToken.START_ARRAY
token.- Specified by:
startArray
in interfaceJsonStreamSource
- Throws:
IOException
-
endArray
public void endArray() throws IOException
Description copied from interface:JsonStreamSource
ConsumeJsonStreamToken.END_ARRAY
token.- Specified by:
endArray
in interfaceJsonStreamSource
- Throws:
IOException
-
peek
public JsonStreamToken peek() throws IOException
Description copied from interface:JsonStreamSource
Peek next token.- Specified by:
peek
in interfaceJsonStreamSource
- Returns:
- token
- Throws:
IOException
-
copy
public void copy(JsonStreamTarget target) throws IOException
Copy events to given target untilpeek() == JsonStreamToken.NONE
. This method does not close streams.- Parameters:
target
-- Throws:
IOException
-
-