`
ddh9504
  • 浏览: 110985 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论

文本文件编码转换

    博客分类:
  • java
阅读更多

public class ExecuteConvertFileTest  
{  
    public static void main (String[] args)  
    {  
        ExecuteConvertFile execute = new ExecuteConvertFileImpl();  
        // 目录  
        String inFilename = "c:/cn.txt";       
        String outFilename = "c:/cn.txt";  
        String encoding = "UTF-8";  
        try 
        {  
            execute.executeConvertFile(inFilename, outFilename, encoding);  
        }  
        catch (FileNotFoundException e)  
        {  
            e.printStackTrace();  
        }  
        catch (IOException e)  
        {  
            e.printStackTrace();  
        }  
    }  
      

 

 

附件是需要引用的jar

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics