private static string Getcurrname (String Provinceid) {try {linenumberreader LNR = new LineNumberReader (New Inputstreamrea Der (DataPrepareUtil.class.getResourceAsStream ("/idcard_address.txt"), "GBK")); String line = Lnr.readline () and while (line! = null) {string[] str = line.replace ("", ""). Split (""); int code = Integer.par Seint (Stringutils.trim (str[0])); if (provinceid.length () = = 2&& Integer.parseint (provinceid) * 10000 = = code) { Return Stringutils.trim (Str[1]);} if (provinceid.length () = = 4&& Integer.parseint (provinceid) * = = code) {return Stringutils.trim (str[1]);} if (provinceid.length () = = 6&& Integer.parseint (provinceid) = = code) {return Stringutils.trim (str[1]);} line = Lnr.readline ();}} catch (Exception e) {e.printstacktrace (); throw new RuntimeException (e);} return null;}
Get an address based on your Social Security number