Thu Feb 07, 2013 8:09 pm
import java.io.*;
public class FileSpace {
private FileInputStream in;
public FileSpace(String filename) {
in = new FileInputStream(filename);
}
public String readWord() {
int c;
StringBuffer buf = new StringBuffer();
do {
c = in.read();
if (Character.isSpace((char)c))
return buf.toString();
else
buf.append((char)c);
} while (c != -1);
return buf.toString();
}
}
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.