com.fasterxml.jackson.core.SerializableString |
Known Indirect Subclasses |
Interface that defines how Jackson package can interact with efficient pre-serialized or lazily-serialized and reused String representations. Typically implementations store possible serialized version(s) so that serialization of String can be done more efficiently, especially when used multiple times.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Method that will append quoted characters of this String into given
buffer.
| |||||||||||
Method that will append quoted UTF-8 bytes of this String into given
buffer, if there is enough room; if not, returns -1.
| |||||||||||
Method that will append unquoted characters of this String into given
buffer.
| |||||||||||
Method that will append unquoted ('raw') UTF-8 bytes of this String into given
buffer.
| |||||||||||
Returns JSON quoted form of the String, as character array.
| |||||||||||
Returns UTF-8 encoded version of JSON-quoted String.
| |||||||||||
Returns UTF-8 encoded version of unquoted String.
| |||||||||||
Returns length of the (unquoted) String as characters.
| |||||||||||
Returns unquoted String that this object represents (and offers
serialized forms for)
| |||||||||||
Method that will append quoted characters of this String into given buffer. Functionally equivalent to:
char[] ch = str.asQuotedChars(); System.arraycopy(ch, 0, buffer, offset, ch.length); return ch.length;
Method that will append quoted UTF-8 bytes of this String into given buffer, if there is enough room; if not, returns -1. Functionally equivalent to:
byte[] bytes = str.asQuotedUTF8(); System.arraycopy(bytes, 0, buffer, offset, bytes.length); return bytes.length;
Method that will append unquoted characters of this String into given buffer. Functionally equivalent to:
char[] ch = str.getValue().toCharArray(); System.arraycopy(bytes, 0, buffer, offset, ch.length); return ch.length;
Method that will append unquoted ('raw') UTF-8 bytes of this String into given buffer. Functionally equivalent to:
byte[] bytes = str.asUnquotedUTF8(); System.arraycopy(bytes, 0, buffer, offset, bytes.length); return bytes.length;
Returns JSON quoted form of the String, as character array. Result can be embedded as-is in textual JSON as property name or JSON String.
Returns UTF-8 encoded version of JSON-quoted String. Functionally equivalent to (but more efficient than):
new String(asQuotedChars()).getBytes("UTF-8");
Returns UTF-8 encoded version of unquoted String. Functionally equivalent to (but more efficient than):
getValue().getBytes("UTF-8");
Returns length of the (unquoted) String as characters. Functionally equvalent to:
getValue().length();
Returns unquoted String that this object represents (and offers serialized forms for)