how to detect encoding of text file before inputStream in java?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/499010/java-how-to-determine-the-correct-charset-encoding-of-a-stream">Java : How to determine the correct charset encoding of a stream</a>  </p>
</blockquote>



<p>i'm trying to read an ANSI text file in java but, i don't know the encoding of the text inside , is there any way to detect the encoding of text file before getting it using FileInputStream ?</p>
