Thanks Horatio, I'll check that link out in a minute.
At the moment I'm having an annoyance with reading from a DataInputStream.
I'm trying to read in a plain text file, about 85kb, but sometimes it does not read it all....it mostly finishes the file too early.
Here is the code I have:
import java.io.*;
import java.net.*;
class fileReader {//start of class
public static void main (
String[] args) {//main method
try{
InputStream fileSource = new URL("http://members.aol.com/davllew/teapot.x3d").openStream();
byte [] buf = new byte[fileSource.available()];
new DataInputStream(fileSource).readFully(buf);
String text = new String(buf);
System.out.println(text);
fileSource.close();
}
catch(IOException e){
System.out.println("Error reading file!");
}
}//main method
}//end of class
Is this a well known problem? and If so, I wonder how to avoid it.
cheers again
