public class BufferRecyclers extends Object
BufferRecycler
,
JsonStringEncoder
Modifier and Type | Field and Description |
---|---|
protected static ThreadLocal<SoftReference<JsonStringEncoder>> |
_encoderRef
This
ThreadLocal contains a SoftReference
to a BufferRecycler used to provide a low-cost
buffer recycling between reader and writer instances. |
protected static ThreadLocal<SoftReference<BufferRecycler>> |
_recyclerRef
This
ThreadLocal contains a SoftReference
to a BufferRecycler used to provide a low-cost
buffer recycling between reader and writer instances. |
Constructor and Description |
---|
BufferRecyclers() |
Modifier and Type | Method and Description |
---|---|
static byte[] |
encodeAsUTF8(String text)
Helper method for encoding given String as UTF-8 encoded
|
static BufferRecycler |
getBufferRecycler() |
static JsonStringEncoder |
getJsonStringEncoder() |
static void |
quoteAsJsonText(CharSequence input,
StringBuilder output) |
static char[] |
quoteAsJsonText(String rawText) |
static byte[] |
quoteAsJsonUTF8(String rawText) |
protected static final ThreadLocal<SoftReference<BufferRecycler>> _recyclerRef
ThreadLocal
contains a SoftReference
to a BufferRecycler
used to provide a low-cost
buffer recycling between reader and writer instances.protected static final ThreadLocal<SoftReference<JsonStringEncoder>> _encoderRef
ThreadLocal
contains a SoftReference
to a BufferRecycler
used to provide a low-cost
buffer recycling between reader and writer instances.public static BufferRecycler getBufferRecycler()
public static JsonStringEncoder getJsonStringEncoder()
public static byte[] encodeAsUTF8(String text)
public static char[] quoteAsJsonText(String rawText)
public static void quoteAsJsonText(CharSequence input, StringBuilder output)
public static byte[] quoteAsJsonUTF8(String rawText)
Copyright © 2008–2018 FasterXML. All rights reserved.