Hi,
This is the method that has problem(s), but i can't find.
The problem :
at first call of method it returns all chars in file, but at second and later calls it returns "".
thanks.Code:public final String getchars() throws IOException { InputStream is=Resources.utf8file; StringBuffer buffer = null; int ch=0; try { if (is == null) throw new Exception("File Does Not Exist"); buffer = new StringBuffer(); while((ch = is.read())>-1) buffer.append((char) ch) ; if (is != null) is.close(); } catch (Exception ex) { ex.printStackTrace(); }

Reply With Quote


