in = new FileInputStream(filename);
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();