question: private void toWagonFormat ( IntAndFloatArrayLeafNode node , DataOutputStream out , String extension , PrintWriter pw ) throws IOException { StringBuilder sb = new StringBuilder ( ) ; int data [ ] = node . getIntData ( ) ; float floats [ ] = node . getFloatData ( ) ; sb . append ( "(((" ) ; for ( int i = 0 ; i < data . length ; i ++ ) { sb . append ( "(" + data [ i ] + " " + floats [ i ] + ")" ) ; if ( i + 1 != data . length ) { sb . append ( " " ) ; } } sb . append ( ") 0))" + extension ) ; if ( out != null ) { writeStringToOutput ( sb . toString ( ) , out ) ; } else { } if ( pw != null ) { pw . println ( sb . toString ( ) ) ; } }
target:  Writes the Cart to the given DataOut in Wagon Format