Package nbbrd.io.xml
Class Stax.StreamParser<T>
- java.lang.Object
-
- nbbrd.io.xml.Stax.StreamParser<T>
-
- All Implemented Interfaces:
FileParser<T>,TextParser<T>,Xml.Parser<T>
- Enclosing class:
- Stax
public static final class Stax.StreamParser<T> extends Object implements Xml.Parser<T>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classStax.StreamParser.Builder<T>
-
Constructor Summary
Constructors Constructor Description StreamParser()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T> @NonNull Stax.StreamParser<T>flowOf(@NonNull Stax.FlowHandler<XMLStreamReader,T> handler)@NonNull Tparse(@NonNull XMLStreamReader input, @NonNull Closeable onClose)@NonNull TparseFile(@NonNull File source)@NonNull TparseFile(@NonNull File source, @NonNull Charset encoding)@NonNull TparseReader(@NonNull Reader resource)@NonNull TparseReader(@NonNull IOSupplier<? extends Reader> source)@NonNull TparseStream(@NonNull InputStream resource)@NonNull TparseStream(@NonNull InputStream resource, @NonNull Charset encoding)@NonNull TparseStream(@NonNull IOSupplier<? extends InputStream> source)@NonNull TparseStream(@NonNull IOSupplier<? extends InputStream> source, @NonNull Charset encoding)static <T> @NonNull Stax.StreamParser<T>valueOf(@NonNull Stax.ValueHandler<XMLStreamReader,T> handler)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface nbbrd.io.FileParser
parsePath, parseResource
-
Methods inherited from interface nbbrd.io.text.TextParser
parseChars, parsePath, parseResource
-
Methods inherited from interface nbbrd.io.xml.Xml.Parser
andThen, isIgnoreXXE
-
-
-
-
Method Detail
-
flowOf
public static <T> @NonNull Stax.StreamParser<T> flowOf(@NonNull Stax.FlowHandler<XMLStreamReader,T> handler)
-
valueOf
public static <T> @NonNull Stax.StreamParser<T> valueOf(@NonNull Stax.ValueHandler<XMLStreamReader,T> handler)
-
parseFile
public @NonNull T parseFile(@NonNull File source) throws IOException
- Specified by:
parseFilein interfaceFileParser<T>- Throws:
IOException
-
parseFile
public @NonNull T parseFile(@NonNull File source, @NonNull Charset encoding) throws IOException
- Specified by:
parseFilein interfaceTextParser<T>- Throws:
IOException
-
parseReader
public @NonNull T parseReader(@NonNull IOSupplier<? extends Reader> source) throws IOException
- Specified by:
parseReaderin interfaceTextParser<T>- Throws:
IOException
-
parseStream
public @NonNull T parseStream(@NonNull IOSupplier<? extends InputStream> source) throws IOException
- Specified by:
parseStreamin interfaceFileParser<T>- Throws:
IOException
-
parseStream
public @NonNull T parseStream(@NonNull IOSupplier<? extends InputStream> source, @NonNull Charset encoding) throws IOException
- Specified by:
parseStreamin interfaceTextParser<T>- Throws:
IOException
-
parseReader
public @NonNull T parseReader(@NonNull Reader resource) throws IOException
- Specified by:
parseReaderin interfaceTextParser<T>- Throws:
IOException
-
parseStream
public @NonNull T parseStream(@NonNull InputStream resource) throws IOException
- Specified by:
parseStreamin interfaceFileParser<T>- Throws:
IOException
-
parseStream
public @NonNull T parseStream(@NonNull InputStream resource, @NonNull Charset encoding) throws IOException
- Specified by:
parseStreamin interfaceTextParser<T>- Throws:
IOException
-
parse
public @NonNull T parse(@NonNull XMLStreamReader input, @NonNull Closeable onClose) throws IOException
- Throws:
IOException
-
-