@Override
        public Iterator<String> iterator() {

                if (accessed)
                        throw new IllegalStateException("Cannot access file iterator more than once");
                accessed = true;

                final Scanner sc = new Scanner(is);

                return new Iterator<String>() {

                        @Override
                        public boolean hasNext() {
                                return sc.hasNextLine();
                        }

                        @Override
                        public String next() {
                                return sc.nextLine();
                        }

                        @Override
                        public void remove() {
                                throw new UnsupportedOperationException();
                        }
                };
        }