Mercurial > hg > jslab
view src/samer/units/StreamToDouble.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
// // StreamToVec.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.core.types.*; import samer.tools.*; import samer.maths.*; import java.io.*; public class StreamToDouble extends AnonymousTask { DoubleModel x; InputStream in; DataInputStream objin; public StreamToDouble(DoubleModel x, InputStream in) throws Exception { this.x=x; this.in=in; objin=new DataInputStream(in); } public void dispose() { try { objin.close(); } catch (Exception ex) {} // close out? } public void run() throws Exception { x.set((double)objin.readFloat()); } }