Java IO Tutorial - Java CharsetDecoder .isAutoDetecting ()








Syntax

CharsetDecoder.isAutoDetecting() has the following syntax.

public boolean isAutoDetecting()

Example

In the following code shows how to use CharsetDecoder.isAutoDetecting() method.

import java.nio.charset.Charset;
import java.nio.charset.CharsetDecoder;
/*from w  w  w.  j  ava2s. c  om*/
public class Main {
  public static void main(String[] argv) throws Exception {
    Charset charset = Charset.forName("ISO-8859-1");
    CharsetDecoder decoder = charset.newDecoder();

    System.out.println(decoder.isAutoDetecting());
  }
}

The code above generates the following result.