@@ -0,0 +1,2150 @@
+package org.realityforge.antix;%0A%0Aimport java.io.File;%0Aimport java.io.FileInputStream;%0Aimport java.io.FileOutputStream;%0Aimport java.io.IOException;%0Aimport org.apache.tools.ant.BuildException;%0Aimport org.apache.tools.ant.Task;%0A%0A/**%0A * Task for copying a task from one file to another file replacing non-ascii%0A * chars with ? ensuring it is an ascii value.%0A */%0Apublic class ToAsciiTask%0A    extends Task%0A%7B%0A%0A  private File src;%0A  private File dest;%0A%0A  public void setSrc( final File src )%0A  %7B%0A    this.src = src;%0A  %7D%0A%0A  public void setDest( final File dest )%0A  %7B%0A    this.dest = dest;%0A  %7D%0A%0A  public void execute()%0A  %7B%0A    validate();%0A    processFiles();%0A  %7D%0A%0A  private void processFiles()%0A  %7B%0A    FileInputStream inputStream = null;%0A    FileOutputStream outputStream = null;%0A    try%0A    %7B%0A      if( dest.exists() ) dest.delete();%0A%0A      inputStream = new FileInputStream( src );%0A      outputStream = new FileOutputStream( dest );%0A      while( inputStream.available() %3E 0 )%0A      %7B%0A        final int value = inputStream.read();%0A        final int output = isPrintable( value ) ? value : '?';%0A        outputStream.write( output );%0A      %7D%0A    %7D%0A    catch( IOException ioe )%0A    %7B%0A      throw new BuildException( %22Error loading file %22 + src, ioe, getLocation() );%0A    %7D%0A    finally%0A    %7B%0A      if( null != inputStream )%0A      %7B%0A        try%0A        %7B%0A          inputStream.close();%0A        %7D%0A        catch( final IOException ioe )%0A        %7B%0A          //ignore%0A        %7D%0A      %7D%0A      if( null != outputStream )%0A      %7B%0A        try%0A        %7B%0A          outputStream.close();%0A        %7D%0A        catch( final IOException ioe )%0A        %7B%0A          //ignore%0A        %7D%0A      %7D%0A    %7D%0A  %7D%0A%0A  private boolean isPrintable( final int value )%0A  %7B%0A    return !( value %3C 32 %7C%7C value %3E 126 ) %7C%7C Character.isWhitespace( value );%0A  %7D%0A%0A  private void validate()%0A  %7B%0A    if( null == src ) throw new BuildException( %22Src not set.%22 );%0A    if( !src.exists() ) throw new BuildException( %22Src does not exist. - %22 + src );%0A    if( !src.isFile() ) throw new BuildException( %22Src is not a regular file. - %22 + src );%0A    if( null == dest ) throw new BuildException( %22Dest not set.%22 );%0A  %7D%0A%7D

Add task that copies one file to another, replacing non printing characters with ?