Package com.backblaze.b2.json
Class B2JsonLongHandler
- java.lang.Object
- 
- com.backblaze.b2.json.B2JsonLongHandler
 
- 
- All Implemented Interfaces:
- B2JsonTypeHandler<java.lang.Long>
 
 public class B2JsonLongHandler extends java.lang.Object implements B2JsonTypeHandler<java.lang.Long> (De)serializes Long objects.
- 
- 
Constructor SummaryConstructors Constructor Description B2JsonLongHandler(boolean isPrimitive)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.LongdefaultValueForOptional()Returns the default value to use when an optional field is not present.java.lang.Longdeserialize(B2JsonReader in, B2JsonOptions options)Deserialize one object from a JSON input stream.java.lang.LongdeserializeUrlParam(java.lang.String value)When an API is called with GET, this is used to deserialize one of the values.java.lang.reflect.TypegetHandledType()What class does this handle?booleanisStringInJson()Does this type look like a string in JSON?voidserialize(java.lang.Long obj, B2JsonOptions options, B2JsonWriter out)Serialize one object of the class to a JSON output stream.
 
- 
- 
- 
Method Detail- 
getHandledTypepublic java.lang.reflect.Type getHandledType() Description copied from interface:B2JsonTypeHandlerWhat class does this handle?- Specified by:
- getHandledTypein interface- B2JsonTypeHandler<java.lang.Long>
- Returns:
 
 - 
serializepublic void serialize(java.lang.Long obj, B2JsonOptions options, B2JsonWriter out) throws java.io.IOExceptionDescription copied from interface:B2JsonTypeHandlerSerialize one object of the class to a JSON output stream. The object is guaranteed not to be null.- Specified by:
- serializein interface- B2JsonTypeHandler<java.lang.Long>
- Throws:
- java.io.IOException
 
 - 
deserializepublic java.lang.Long deserialize(B2JsonReader in, B2JsonOptions options) throws B2JsonException, java.io.IOException Description copied from interface:B2JsonTypeHandlerDeserialize 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:
- deserializein interface- B2JsonTypeHandler<java.lang.Long>
- Throws:
- B2JsonException
- java.io.IOException
 
 - 
deserializeUrlParampublic java.lang.Long deserializeUrlParam(java.lang.String value) throws B2JsonExceptionDescription copied from interface:B2JsonTypeHandlerWhen an API is called with GET, this is used to deserialize one of the values.- Specified by:
- deserializeUrlParamin interface- B2JsonTypeHandler<java.lang.Long>
- Throws:
- B2JsonException
 
 - 
defaultValueForOptionalpublic java.lang.Long defaultValueForOptional() Description copied from interface:B2JsonTypeHandlerReturns the default value to use when an optional field is not present.- Specified by:
- defaultValueForOptionalin interface- B2JsonTypeHandler<java.lang.Long>
 
 - 
isStringInJsonpublic boolean isStringInJson() Description copied from interface:B2JsonTypeHandlerDoes this type look like a string in JSON?- Specified by:
- isStringInJsonin interface- B2JsonTypeHandler<java.lang.Long>
 
 
- 
 
-