Package jnr.ffi.provider.converters
Class StringUtil
java.lang.Object
jnr.ffi.provider.converters.StringUtil
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static Charset
getCharset
(ToNativeContext toNativeContext) (package private) static CharsetDecoder
getDecoder
(Charset charset, ThreadLocal<Reference<CharsetDecoder>> localDecoder) (package private) static CharsetEncoder
getEncoder
(Charset charset, ThreadLocal<Reference<CharsetEncoder>> localEncoder) private static Charset
getEncodingCharset
(Collection<Annotation> annotations) private static CharsetDecoder
initDecoder
(Charset charset, ThreadLocal<Reference<CharsetDecoder>> localDecoder) private static CharsetEncoder
initEncoder
(Charset charset, ThreadLocal<Reference<CharsetEncoder>> localEncoder) (package private) static int
stringLength
(ByteBuffer in, int terminatorWidth) (package private) static int
terminatorWidth
(Charset charset) (package private) static void
throwException
(CoderResult result)
-
Field Details
-
UTF8
-
USASCII
-
ISO8859_1
-
UTF16
-
UTF16LE
-
UTF16BE
-
-
Constructor Details
-
StringUtil
private StringUtil()
-
-
Method Details
-
getEncoder
static CharsetEncoder getEncoder(Charset charset, ThreadLocal<Reference<CharsetEncoder>> localEncoder) -
getDecoder
static CharsetDecoder getDecoder(Charset charset, ThreadLocal<Reference<CharsetDecoder>> localDecoder) -
initEncoder
private static CharsetEncoder initEncoder(Charset charset, ThreadLocal<Reference<CharsetEncoder>> localEncoder) -
initDecoder
private static CharsetDecoder initDecoder(Charset charset, ThreadLocal<Reference<CharsetDecoder>> localDecoder) -
getCharset
-
getEncodingCharset
-
throwException
-
terminatorWidth
-
stringLength
-