import java.io.*; import java.util.StringTokenizer; public class tyhik{ static String loeFail(String failinimi) throws IOException{ StringBuffer sb=new StringBuffer(); RandomAccessFile rf=new RandomAccessFile(failinimi, "r"); String rida=rf.readLine(); while(rida!=null){ sb.append(rida+" "); rida=rf.readLine(); } int pikkus=sb.length(); sb.delete(pikkus-1, pikkus); return new String(sb); } }