java.lang.Object | |
↳ | com.fasterxml.jackson.core.io.JsonStringEncoder |
Helper class used for efficient encoding of JSON String values (including JSON field names) into Strings or UTF-8 byte arrays.
Note that methods in here are somewhat optimized, but not ridiculously so. Reason is that conversion method results are expected to be cached so that these methods will not be hot spots during normal operation.
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
_byteBuilder | Lazily-constructed builder used for UTF-8 encoding of text values (quoted and unquoted) | ||||||||||
_quoteBuffer | Temporary buffer used for composing quote/escape sequences | ||||||||||
_textBuffer | Lazily constructed text buffer used to produce JSON encoded Strings as characters (without UTF-8 encoding) | ||||||||||
_threadEncoder | This ThreadLocal contains a java.lang.ref.SoftRerefence
to a BufferRecycler used to provide a low-cost
buffer recycling between reader and writer instances. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Will encode given String as UTF-8 (without any quoting), return
resulting byte array.
| |||||||||||
Factory method for getting an instance; this is either recycled per-thread instance,
or a newly constructed one.
| |||||||||||
Method that will quote text contents using JSON standard quoting,
and return results as a character array
| |||||||||||
Will quote given JSON String value using standard quoting, encode
results as UTF-8, and return result as a byte array.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Lazily-constructed builder used for UTF-8 encoding of text values (quoted and unquoted)
Temporary buffer used for composing quote/escape sequences
Lazily constructed text buffer used to produce JSON encoded Strings as characters (without UTF-8 encoding)
This ThreadLocal
contains a java.lang.ref.SoftRerefence
to a BufferRecycler
used to provide a low-cost
buffer recycling between reader and writer instances.
Will encode given String as UTF-8 (without any quoting), return resulting byte array.
Factory method for getting an instance; this is either recycled per-thread instance, or a newly constructed one.
Method that will quote text contents using JSON standard quoting, and return results as a character array
Will quote given JSON String value using standard quoting, encode results as UTF-8, and return result as a byte array.