您的位置:首页 > 其它

从原理到测试 全面解析DNS欺骗攻与防

2009-05-12 22:47 309 查看
   public static String from8859(String source)

   {

       if(source == null)

           return null;

       String s1;

       try

       {

           String s = new String(source.getBytes("iso-8859-1"),"gbk");

           String s2 = s;

           return s2;

       }

       catch(Exception uee)

       {

           s1 = null;

       }

       String s3 = s1;

       return s3;

   }

//往数据写入时用to8859()

   public static String to8859(String source)

   {

       if(source == null)

           return null;

       String s1;

       try

       {

           String s = new String(source.getBytes("gbk"), "iso-8859-1");

           String s2 = s;

           return s2;

       }

       catch(Exception uee)

       {

           s1 = null;

       }

       String s3 = s1;

       return s3;

   }
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: