public static String get_charset( File file ) { String charset = "GBK"; byte[] first3Bytes = new byte[3]; try { boolean; BufferedInputStream bis = new BufferedInputStream( new FileInputStream( file ) ); bis.mark( 0 ); int read = bis.read( first3Bytes, 0, 3 ); if ( read == -1 ) return charset; if ( first3Bytes[0] == (byte) 0xFF && first3Bytes[1] == (byte) 0xFE ) { chars public