Mercurial > hg > jslab
view src/samer/units/VecWriter.java @ 0:bf79fb79ee13
Initial Mercurial check in.
author | samer |
---|---|
date | Tue, 17 Jan 2012 17:50:20 +0000 |
parents | |
children |
line wrap: on
line source
// // VecWriter.java // // // Created by Samer Abdallah on Mon Jun 10 2002. // Copyright (c) 2002 __MyCompanyName__. All rights reserved. // package samer.units; import samer.core.*; import samer.tools.*; import samer.maths.*; import java.io.*; public class VecWriter extends AnonymousTask { Vec x; // the vector itself PrintWriter prn; public VecWriter(Vec x, Writer out) throws Exception { this.x=x; prn = new PrintWriter(out); } public void dispose() { try { prn.flush(); } catch (Exception ex) {} // prn.close(); } public void run() throws Exception { Vec.Iterator i=x.iterator(); prn.print(i.next()); while (i.more()) { prn.print(' '); prn.print(i.next()); } prn.println(); } public void stopping() { try { prn.flush(); } catch (Exception ex) {} } }