title: Java Text File Encoding
body: <p>I have a text file and it can be ANSI (with ISO-8859-2 charset), UTF-8, UCS-2 Big or Little Endian.</p>
  
  <p>Is there any way to detect the encoding of the file to read it properly?</p>
  
  <p>Or is it possible to read a file without giving the encoding? (and it reads the file as it is)</p>
  
  <p>(There are several program that can detect and convert encoding/format of text files.)</p>