Reading in text and casting it

From: neosenate (
Date: 08/09/04

Date: 9 Aug 2004 07:30:57 -0700

Hi all,

I have to write a program that will take in a txt file containing a
number of floats, parse into individual numbers and then cast the
floats into binary, before writing all the binary numbers to another

At the moment i've got

StreamTokenizer in = new StreamTokenizer(new

to read in the file and to convert the floats i'm going to use,


The problem i'm coming across is that i'm trying to use a tokenizer to
break up the text, but when i try and cast it, i get an error saying
that i cannot cast a non-static variable.

some of the input data in the file looks like this... "13.5 8.2
8.8 3.4".

Any help would be greatly appreciated,