java.lang.Object
tools.jackson.databind.JacksonSerializable.Base
tools.jackson.databind.JsonNode
tools.jackson.databind.node.BaseJsonNode
tools.jackson.databind.node.ValueNode
tools.jackson.databind.node.BinaryNode
- All Implemented Interfaces:
Serializable
,Iterable<JsonNode>
,TreeNode
,JacksonSerializable
Value node that contains Base64 encoded binary value, which will be
output and stored as Json String value.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class tools.jackson.databind.JsonNode
JsonNode.OverwriteMode
Nested classes/interfaces inherited from interface tools.jackson.databind.JacksonSerializable
JacksonSerializable.Base
-
Field Summary
FieldsFields inherited from class tools.jackson.databind.node.ValueNode
BD_MAX_INTEGER, BD_MAX_LONG, BD_MAX_SHORT, BD_MIN_INTEGER, BD_MIN_LONG, BD_MIN_SHORT, BI_MAX_INTEGER, BI_MAX_LONG, BI_MAX_SHORT, BI_MIN_INTEGER, BI_MIN_LONG, BI_MIN_SHORT, MISSING
Fields inherited from class tools.jackson.databind.node.BaseJsonNode
OPT_FALSE, OPT_TRUE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected String
Hmmh.protected String
Method for implementation classes to return a short description of contained value, to be used in error messages.asToken()
Method that can be used for efficient type detection when using stream abstraction for traversing nodes.byte[]
Note: caller is not to modify returned array in any way, since it is not a copy but reference to the underlying byte array.boolean
Equality for node objects is defined as full (deep) value equality.Return the type of this nodeint
hashCode()
final void
serialize
(JsonGenerator g, SerializationContext provider) Method called to serialize node instances using given generator.static BinaryNode
valueOf
(byte[] data) static BinaryNode
valueOf
(byte[] data, int offset, int length) Methods inherited from class tools.jackson.databind.node.ValueNode
_at, deepCopy, findParent, findParents, findValue, findValues, findValuesAsString, get, get, has, has, hasNonNull, hasNonNull, isEmpty, path, path, serializeWithType
Methods inherited from class tools.jackson.databind.node.BaseJsonNode
_asBoolean, _jsonPointerIfValid, _reportBigDecimalCoercionNaNFail, _reportBigIntegerCoercionFractionFail, _reportBigIntegerCoercionNaNFail, _reportCoercionFail, _reportDoubleCoercionRangeFail, _reportFloatCoercionRangeFail, _reportIntCoercionFractionFail, _reportIntCoercionNaNFail, _reportIntCoercionRangeFail, _reportLongCoercionFractionFail, _reportLongCoercionNaNFail, _reportLongCoercionRangeFail, _reportShortCoercionFractionFail, _reportShortCoercionRangeFail, _reportWrongNodeType, _withArray, _withObject, _withXxxMayReplace, _withXxxVerifyReplace, asBigInteger, asBigInteger, asBigIntegerOpt, asBoolean, asBoolean, asBooleanOpt, asDecimal, asDecimal, asDecimalOpt, asDouble, asDouble, asDoubleOpt, asFloat, asFloat, asInt, asInt, asIntOpt, asLong, asLong, asLongOpt, asShort, asShort, asString, asString, asStringOpt, bigIntegerValue, bigIntegerValue, bigIntegerValueOpt, booleanValue, booleanValue, booleanValueOpt, decimalValue, decimalValue, decimalValueOpt, doubleValue, doubleValue, doubleValueOpt, findPath, floatValue, floatValue, intValue, intValue, intValueOpt, isEmbeddedValue, isMissingNode, longValue, longValue, longValueOpt, numberType, numberValue, required, required, shortValue, shortValue, stringValue, stringValue, stringValueOpt, toPrettyString, toString, traverse, withArray, withObject
Methods inherited from class tools.jackson.databind.JsonNode
_reportRequiredViolation, _reportUnsupportedOperation, _this, asOptional, asText, asText, at, at, canConvertToExactIntegral, canConvertToInt, canConvertToLong, canConvertToShort, equals, findParents, findValues, findValuesAsString, forEachEntry, isArray, isBigDecimal, isBigInteger, isBinary, isBoolean, isContainer, isDouble, isFloat, isFloatingPointNumber, isInt, isIntegralNumber, isLong, isNull, isNumber, isObject, isPojo, isShort, isString, isTextual, isValueNode, iterator, optional, optional, properties, propertyNames, propertyStream, require, requiredAt, requiredAt, requireNonNull, size, spliterator, textValue, values, valueStream, withArray, withArray, withArray, withArrayProperty, withObject, withObject, withObject, withObjectProperty
Methods inherited from class tools.jackson.databind.JacksonSerializable.Base
isEmpty
-
Field Details
-
_data
protected final byte[] _data
-
-
Constructor Details
-
BinaryNode
public BinaryNode(byte[] data) -
BinaryNode
public BinaryNode(byte[] data, int offset, int length)
-
-
Method Details
-
valueOf
-
valueOf
-
getNodeType
Description copied from class:JsonNode
Return the type of this node- Specified by:
getNodeType
in classJsonNode
- Returns:
- the node type as a
JsonNodeType
enum value
-
asToken
Description copied from class:BaseJsonNode
Method that can be used for efficient type detection when using stream abstraction for traversing nodes. Will return the firstJsonToken
that equivalent stream event would produce (for most nodes there is just one token but for structured/container types multiple) -
_valueDesc
Description copied from class:BaseJsonNode
Method for implementation classes to return a short description of contained value, to be used in error messages.- Specified by:
_valueDesc
in classBaseJsonNode
-
binaryValue
public byte[] binaryValue()Note: caller is not to modify returned array in any way, since it is not a copy but reference to the underlying byte array.
- Overrides:
binaryValue
in classBaseJsonNode
- Returns:
- Binary value this node represents (if node contains binary value)
-
_asString
Hmmh. This is not quite as efficient as usingserialize(tools.jackson.core.JsonGenerator, tools.jackson.databind.SerializationContext)
, but will work correctly.- Overrides:
_asString
in classBaseJsonNode
- Returns:
- Coerced value if possible; otherwise
null
to indicate this node cannot be coerced.
-
serialize
Description copied from class:BaseJsonNode
Method called to serialize node instances using given generator.- Specified by:
serialize
in interfaceJacksonSerializable
- Specified by:
serialize
in classBaseJsonNode
- Throws:
JacksonException
-
equals
Description copied from class:JsonNode
Equality for node objects is defined as full (deep) value equality. This means that it is possible to compare complete JSON trees for equality by comparing equality of root nodes.Note: marked as abstract to ensure all implementation classes define it properly and not rely on definition from
Object
. -
hashCode
public int hashCode()- Specified by:
hashCode
in classBaseJsonNode
-