private static UTFEncoderDecoder newUTFEncoderDecoder(boolean fastStringEnabled, UtfWriterType utfWriterType) {
UTFEncoderDecoder.UtfWriter utfWriter;
switch (utfWriterType) {
case UNSAFE:
UnsafeBasedCharArrayUtfWriter unsafeBasedWriter = new UnsafeBasedCharArrayUtfWriter();
if (!unsafeBasedWriter.isAvailable()) {
return null;
}
utfWriter = unsafeBasedWriter;
break;