Sets a new encoding. @param encoding encoding (ignored if null or an empty string) @return self reference @throws IOException I/O Exception
(final String encoding)
| 118 | * @throws IOException I/O Exception |
| 119 | */ |
| 120 | public TextInput encoding(final String encoding) throws IOException { |
| 121 | if(encoding != null && !encoding.isEmpty()) { |
| 122 | final String enc = normEncoding(encoding, false); |
| 123 | decoder = TextDecoder.get(enc != UTF16 ? enc : |
| 124 | decoder.encoding.equals(UTF16LE) ? UTF16LE : UTF16BE); |
| 125 | decoder.fallback = fallback; |
| 126 | } |
| 127 | return this; |
| 128 | } |
| 129 | |
| 130 | /** |
| 131 | * Returns the encoding. |
nothing calls this directly
no test coverage detected