Package com.backblaze.b2.json
Class B2JsonBigIntegerHandler
- java.lang.Object
-
- com.backblaze.b2.json.B2JsonBigIntegerHandler
-
- All Implemented Interfaces:
B2JsonTypeHandler<java.math.BigInteger>
public class B2JsonBigIntegerHandler extends java.lang.Object implements B2JsonTypeHandler<java.math.BigInteger>
(De)serializes BigInteger objects.
-
-
Constructor Summary
Constructors Constructor Description B2JsonBigIntegerHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.math.BigInteger
defaultValueForOptional()
Returns the default value to use when an optional field is not present.java.math.BigInteger
deserialize(B2JsonReader in, B2JsonOptions options)
Deserialize one object from a JSON input stream.java.math.BigInteger
deserializeUrlParam(java.lang.String urlValue)
When an API is called with GET, this is used to deserialize one of the values.java.lang.reflect.Type
getHandledType()
What class does this handle?boolean
isStringInJson()
Does this type look like a string in JSON?void
serialize(java.math.BigInteger obj, B2JsonOptions options, B2JsonWriter out)
Serialize one object of the class to a JSON output stream.
-
-
-
Method Detail
-
getHandledType
public java.lang.reflect.Type getHandledType()
Description copied from interface:B2JsonTypeHandler
What class does this handle?- Specified by:
getHandledType
in interfaceB2JsonTypeHandler<java.math.BigInteger>
- Returns:
-
serialize
public void serialize(java.math.BigInteger obj, B2JsonOptions options, B2JsonWriter out) throws java.io.IOException, B2JsonException
Description copied from interface:B2JsonTypeHandler
Serialize one object of the class to a JSON output stream. The object is guaranteed not to be null.- Specified by:
serialize
in interfaceB2JsonTypeHandler<java.math.BigInteger>
- Throws:
java.io.IOException
B2JsonException
-
deserialize
public java.math.BigInteger deserialize(B2JsonReader in, B2JsonOptions options) throws B2JsonException, java.io.IOException
Description copied from interface:B2JsonTypeHandler
Deserialize one object from a JSON input stream. Will never be called when there is "null" in the input stream, and will never return null.- Specified by:
deserialize
in interfaceB2JsonTypeHandler<java.math.BigInteger>
- Throws:
B2JsonException
java.io.IOException
-
deserializeUrlParam
public java.math.BigInteger deserializeUrlParam(java.lang.String urlValue) throws B2JsonException
Description copied from interface:B2JsonTypeHandler
When an API is called with GET, this is used to deserialize one of the values.- Specified by:
deserializeUrlParam
in interfaceB2JsonTypeHandler<java.math.BigInteger>
- Throws:
B2JsonException
-
defaultValueForOptional
public java.math.BigInteger defaultValueForOptional()
Description copied from interface:B2JsonTypeHandler
Returns the default value to use when an optional field is not present.- Specified by:
defaultValueForOptional
in interfaceB2JsonTypeHandler<java.math.BigInteger>
-
isStringInJson
public boolean isStringInJson()
Description copied from interface:B2JsonTypeHandler
Does this type look like a string in JSON?- Specified by:
isStringInJson
in interfaceB2JsonTypeHandler<java.math.BigInteger>
-
-