private static CopyStreamListener createListener ( ) { return new CopyStreamListener ( ) { private long megsTotal = 0 ; // @Override @ Override public void bytesTransferred ( CopyStreamEvent event ) { bytesTransferred ( event . getTotalBytesTransferred ( ) , event . getBytesTransferred ( ) , event . getStreamSize ( ) ) ; } // @Override @ Override public void bytesTransferred ( long totalBytesTransferred , int bytesTransferred , long streamSize ) { long megs = totalBytesTransferred / 1000000 ; for ( long l = megsTotal ; l < megs ; l ++ ) { System . err . print ( "#" ) ; } megsTotal = megs ; } } ; }
Creates the listener .