Possible Duplicate:
Java : How to determine the correct charset encoding of a stream
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 ?