Mercurial > hg > jslab
view src/samer/units/VecWriter.java @ 8:5e3cbbf173aa tip
Reorganise some more
author | samer |
---|---|
date | Fri, 05 Apr 2019 22:41:58 +0100 |
parents | bf79fb79ee13 |
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) {} } }