Package org.postgresql.core
Class CharOptimizedUTF8Encoder
java.lang.Object
org.postgresql.core.Encoding
org.postgresql.core.OptimizedUTF8Encoder
org.postgresql.core.CharOptimizedUTF8Encoder
UTF-8 encoder which validates input and is optimized for jdk 8 and lower where
String
objects are backed by
char[]
.-
Field Summary
Fields inherited from class org.postgresql.core.OptimizedUTF8Encoder
UTF_8_CHARSET
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.postgresql.core.OptimizedUTF8Encoder
charDecode, decodeToChars, getCharArray
Methods inherited from class org.postgresql.core.Encoding
decode, defaultEncoding, encode, getDatabaseEncoding, getDecodingReader, getEncodingWriter, getJVMEncoding, hasAsciiNumbers, name, toString
-
Constructor Details
-
CharOptimizedUTF8Encoder
CharOptimizedUTF8Encoder()
-
-
Method Details
-
decode
Decode an array of bytes into a string.- Overrides:
decode
in classEncoding
- Parameters:
encodedString
- a byte array containing the string to decodeoffset
- the offset inencodedString
of the first byte of the encoded representationlength
- the length, in bytes, of the encoded representation- Returns:
- the decoded string
- Throws:
IOException
- if something goes wrong
-