|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.jackson.JsonNode
org.codehaus.jackson.node.BaseJsonNode
org.codehaus.jackson.node.ValueNode
org.codehaus.jackson.node.BinaryNode
public final class BinaryNode
Value node that contains Base64 encoded binary value, which will be output and stored as Json String value.
Constructor Summary | |
---|---|
BinaryNode(byte[] data)
|
|
BinaryNode(byte[] data,
int offset,
int length)
|
Method Summary | |
---|---|
protected static String |
_asBase64(boolean addQuotes,
byte[] input)
|
JsonToken |
asToken()
Method that can be used for efficient type detection when using stream abstraction for traversing nodes. |
boolean |
equals(Object o)
Note: marked as abstract to ensure all implementation classes define it properly. |
byte[] |
getBinaryValue()
Note: caller is not to modify returned array in any way, since it is not a copy but reference to the underlying byte array. |
String |
getValueAsText()
Hmmh. |
int |
hashCode()
|
boolean |
isBinary()
Method that can be used to check if this node represents binary data (Base64 encoded). |
void |
serialize(JsonGenerator jg,
SerializerProvider provider)
Method called to serialize node instances using given generator. |
String |
toString()
Different from other values, since contents need to be surrounded by (double) quotes. |
static BinaryNode |
valueOf(byte[] data)
|
static BinaryNode |
valueOf(byte[] data,
int offset,
int length)
|
Methods inherited from class org.codehaus.jackson.node.ValueNode |
---|
isValueNode, path, path |
Methods inherited from class org.codehaus.jackson.node.BaseJsonNode |
---|
getNumberType, serializeWithType, traverse, writeTo |
Methods inherited from class org.codehaus.jackson.JsonNode |
---|
get, get, getBigIntegerValue, getBooleanValue, getDecimalValue, getDoubleValue, getElements, getElementValue, getFieldNames, getFieldValue, getIntValue, getLongValue, getNumberValue, getPath, getPath, getTextValue, isArray, isBigDecimal, isBigInteger, isBoolean, isContainerNode, isDouble, isFloatingPointNumber, isInt, isIntegralNumber, isLong, isMissingNode, isNull, isNumber, isObject, isPojo, isTextual, iterator, size |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BinaryNode(byte[] data)
public BinaryNode(byte[] data, int offset, int length)
Method Detail |
---|
public static BinaryNode valueOf(byte[] data)
public static BinaryNode valueOf(byte[] data, int offset, int length)
public JsonToken asToken()
BaseJsonNode
JsonToken
that equivalent
stream event would produce (for most nodes there is just
one token but for structured/container types multiple)
asToken
in class ValueNode
public boolean isBinary()
JsonNode
JsonNode.isTextual()
will
return false if this method returns true.
isBinary
in class JsonNode
public byte[] getBinaryValue()
Note: caller is not to modify returned array in any way, since it is not a copy but reference to the underlying byte array.
getBinaryValue
in class JsonNode
public String getValueAsText()
serialize(org.codehaus.jackson.JsonGenerator, org.codehaus.jackson.map.SerializerProvider)
,
but will work correctly.
getValueAsText
in class JsonNode
public final void serialize(JsonGenerator jg, SerializerProvider provider) throws IOException, JsonProcessingException
BaseJsonNode
serialize
in interface JsonSerializable
serialize
in class BaseJsonNode
IOException
JsonProcessingException
public boolean equals(Object o)
JsonNode
Note: marked as abstract to ensure all implementation classes define it properly.
equals
in class JsonNode
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class ValueNode
protected static String _asBase64(boolean addQuotes, byte[] input)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |