Package aQute.lib.json
Class StringHandler
- java.lang.Object
-
- aQute.lib.json.Handler
-
- aQute.lib.json.StringHandler
-
public class StringHandler extends Handler
-
-
Constructor Summary
Constructors Constructor Description StringHandler()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.lang.Object
collect(Decoder isr, char close)
Gather the input until you find the the closing character making sure that new blocks are are take care of.java.lang.Object
decode(Decoder dec)
java.lang.Object
decode(Decoder dec, boolean s)
java.lang.Object
decode(Decoder dec, java.lang.Number s)
java.lang.Object
decode(Decoder dec, java.lang.String s)
java.lang.Object
decodeArray(Decoder r)
An array can be assigned to a string.java.lang.Object
decodeObject(Decoder r)
An object can be assigned to a string.void
encode(Encoder app, java.lang.Object object, java.util.Map<java.lang.Object,java.lang.reflect.Type> visited)
(package private) static void
string(java.lang.Appendable app, java.lang.String s)
-
-
-
Method Detail
-
encode
public void encode(Encoder app, java.lang.Object object, java.util.Map<java.lang.Object,java.lang.reflect.Type> visited) throws java.io.IOException
-
string
static void string(java.lang.Appendable app, java.lang.String s) throws java.io.IOException
- Throws:
java.io.IOException
-
decode
public java.lang.Object decode(Decoder dec, java.lang.String s) throws java.lang.Exception
-
decode
public java.lang.Object decode(Decoder dec, java.lang.Number s)
-
decodeObject
public java.lang.Object decodeObject(Decoder r) throws java.lang.Exception
An object can be assigned to a string. This means that the stream is interpreted as the object but stored in its complete in the string.- Overrides:
decodeObject
in classHandler
- Throws:
java.lang.Exception
-
decodeArray
public java.lang.Object decodeArray(Decoder r) throws java.lang.Exception
An array can be assigned to a string. This means that the stream is interpreted as the array but stored in its complete in the string.- Overrides:
decodeArray
in classHandler
- Throws:
java.lang.Exception
-
collect
private java.lang.Object collect(Decoder isr, char close) throws java.lang.Exception
Gather the input until you find the the closing character making sure that new blocks are are take care of.This method parses the input for a complete block so that it can be stored in a string. This allows envelopes.
- Parameters:
isr
-c
-- Throws:
java.lang.Exception
-
-