MCPcopy Create free account
hub / github.com/BaseXdb/basex / get

Method get

basex-core/src/main/java/org/basex/io/in/TextDecoder.java:49–57  ·  view source on GitHub ↗

Returns a decoder for the specified encoding. @param encoding normed encoding @return decoder @throws IOException I/O exception

(final String encoding)

Source from the content-addressed store, hash-verified

47 * @throws IOException I/O exception
48 */
49 static TextDecoder get(final String encoding) throws IOException {
50 return switch(encoding) {
51 case UTF8 -> new UTF8();
52 case UTF32 -> new UTF32();
53 case UTF16LE -> new UTF16LE();
54 case UTF16, UTF16BE -> new UTF16BE();
55 default -> new Generic(encoding);
56 };
57 }
58
59 /**
60 * Reads a UTF-16 codepoint.

Callers 2

guessMethod · 0.95
encodingMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected