Example usage for javax.xml.stream XMLEventReader remove

List of usage examples for javax.xml.stream XMLEventReader remove

Introduction

In this page you can find the example usage for javax.xml.stream XMLEventReader remove.

Prototype

default void remove() 

Source Link

Document

Removes from the underlying collection the last element returned by this iterator (optional operation).

Usage

From source file:org.dataconservancy.model.builder.WrappingEventReaderTest.java

@Test(expected = UnsupportedOperationException.class)
public void testRemoveWithDefaultEventReader() throws Exception {
    final XMLEventReader reader = readerFactory
            .createXMLEventReader(IOUtils.toInputStream(SINGLE_ELEMENT_DOC_WHITESPACE));
    assertTrue(reader.hasNext());/*from www.  ja v a 2s  . c  o  m*/
    reader.nextEvent();
    reader.remove();
}

From source file:org.dataconservancy.model.builder.WrappingEventReaderTest.java

@Test(expected = UnsupportedOperationException.class)
public void testRemoveWithWrapperEventReader() throws Exception {
    final XMLEventReader reader = new WrappingEventReader(
            readerFactory.createXMLEventReader(IOUtils.toInputStream(SINGLE_ELEMENT_DOC_WHITESPACE)));
    assertTrue(reader.hasNext());//from   w w  w . j  a  v  a  2  s.c  o  m
    reader.nextEvent();
    reader.remove();
}