Code example for EOFException

0
			out = input.read();
		} catch (IOException ex) {
			// Do nothing 
		} 
		if (out == -1) {
			throw new EOFException();
		} 
		position.move(out == '\n');
		return out;
	} 
 
	public int nextInt() throws EOFException { 
		return (nextByte() << 24) + ((nextByte() & 0xFF) << 16) + ((nextByte() & 0xFF) << 8) + (nextByte() & 0xFF); 
	} 
 
	public int nextShort() throws EOFException { 
		return ((nextByte() & 0xFF) << 8) + (nextByte() & 0xFF); 
	} 
 
	public long nextLong() throws EOFException { 
		return ((long) nextInt() << 32) + (nextInt() & 0xFFFFFFFFL);