@Test public void testProgressingChannel() throws IOException { File file = TestFileUtils.createTempFile( "test" ); File target = new File( targetDir, "testProgressingChannel" ); target.delete(); final AtomicInteger progressed = new AtomicInteger(); ProgressListener listener = new ProgressListener() { public void progressed( ByteBuffer buffer ) throws IOException { progressed.addAndGet( buffer.remaining() ); } }; fileProcessor.copy( file, target, listener ); assertTrue( "file was not created", target.isFile() ); assertEquals( "file was not fully copied", 4, target.length() ); assertEquals( "listener not called", 4, progressed.intValue() ); target.delete(); }
public void copy( File source, File target ) throws IOException { copy( source, target, null ); }
DefaultFileProcessor implements FileProcessor { public void copy( File source, File target ) throws IOException { copy( source, target, null ); } }
DefaultFileProcessor implements FileProcessor { public void copy( File source, File target ) throws IOException { copy( source, target, null ); }  }
DefaultFileProcessor implements FileProcessor { public void copy( File source, File target ) throws IOException { copy( source, target, null ); }  boolean mkdirs( File directory ); void write( File target, String data ); void write( File target, InputStream source ); void copy( File source, File target ); long copy( File source, File target, ProgressListener listener ); void move( File source, File target ); }
DefaultFileProcessor implements FileProcessor { public void copy( File source, File target ) throws IOException { copy( source, target, null ); }  boolean mkdirs( File directory ); void write( File target, String data ); void write( File target, InputStream source ); void copy( File source, File target ); long copy( File source, File target, ProgressListener listener ); void move( File source, File target );  }