public boolean encodeFile(String input,String output) throws IOException {
  byte[] bytes=new byte[128 * 1024];
  FileInputStream in=new FileInputStream(input);
  int bytesRead=in.read(bytes);
  in.close();
  String content=new String(bytes,0,bytesRead,"ISO8859-1");
  content=encodedContents(content);
  bytes=content.getBytes("ISO8859-1");
  FileOutputStream fout=new FileOutputStream(output);
  fout.write(bytes);
  fout.close();
  return true;
}

public boolean encodeFile ( String input , String output ) throws IOException { byte [ ] bytes = new byte [ 128 * 1024 ] ; FileInputStream in = new FileInputStream ( input ) ; int bytesRead = in . read ( bytes ) ; in . close ( ) ; String content = new String ( bytes , 0 , bytesRead , "ISO8859-1" ) ; content = encodedContents ( content ) ; bytes = content . getBytes ( "ISO8859-1" ) ; FileOutputStream fout = new FileOutputStream ( output ) ; fout . write ( bytes ) ; fout . close ( ) ; return true ; }
encoda tutte le stringhe nella forma m . e ( " . . . " ) presenti nel codice .
