Code example for CharsetDecoder

Methods: onMalformedInputonUnmappableCharacter

            encoding = Charset.defaultCharset().name();
        } else if (!Charset.isSupported(encoding)) {
            throw new IllegalArgumentException(encoding + " is not supported");
        decoder = Charset.forName(encoding).newDecoder();
     * Closes this output stream and releases any system resources 
     * associated with this stream. The general contract of <code>close</code> 
     * is that it closes the output stream. A closed stream cannot perform 
     * output operations and cannot be reopened. 
     * <p> 
     * @exception  IOException  if an I/O error occurs. 
    public void close() throws IOException {
Experience pair programming with AI  Get Codota for Java