Array array = new Array();
array.add( "ape" );
array.add( "bat" );
array.add( "cat" );
OutputStreamIterator output = new OutputStreamIterator( System.out );
Enumeration input = array.elements();
while ( input.hasMoreElements() )
output.put( input.nextElement() );
System.out.println(); // Flush output.
// You can use an algorithm to do the same thing.
Copying.copy( array, output );
System.out.println(); // Flush output.