加密后,可以解密还原,没有问题
public String  readfile(String  filename) throws  IOException
  {
    String strbuffer=new String();
    byte[] data=new byte[500];
    int nread;
    try{
      FileInputStream inputfile=new FileInputStream(filename);
      DataInputStream inputdata=new DataInputStream(inputfile);
      while((nread=inputdata.read(data))!=-1)
        strbuffer=strbuffer+new String(data,0,nread);
       inputdata.close();
       }
       catch(IOException e)
       {
         throw e;
       }
       return  strbuffer;
  }
   public void  savefile(String filename) throws  IOException
   {
     try{
             FileOutputStream outfile=new FileOutputStream(filename);
             DataOutputStream outdata=new DataOutputStream(outfile);
             //outdata.write(jEditorPane1.getText().getBytes());
             outdata.writeBytes(jEditorPane1.getText());
             outdata.flush();
             outdata.close();
     }
     catch(IOException e)
     {
        throw e;
      }
  }