// Just a template - has to be modified InputStream is = getClass().getResourceAsStream(“small.txt"); try{ int ch; while ((ch=is.read()) !=-1) { switch (ch) { case '\r': is.read(); case '\n': v.addElement(new Integer(x)); x = 0; break; default: x = 10 * x + (ch - '0'); } }