Package nbbrd.io.text
Interface TextParser<T>
public interface TextParser<T>
-
Method Summary
Modifier and TypeMethodDescriptiondefault <V> @NonNull TextParser<V> andThen(@NonNull IOFunction<? super T, ? extends V> after) default @NonNull FileParser<T> asFileParser(@NonNull Charset encoding) asParser()static <T> @NonNull TextParser<T> onParsingLines(@NonNull Function<? super Stream<String>, ? extends T> function) static <T> @NonNull TextParser<T> onParsingReader(@NonNull IOFunction<? super Reader, ? extends T> function) default TparseChars(@NonNull CharSequence source) default Tdefault TparseReader(@NonNull Reader resource) default TparseReader(@NonNull IOSupplier<? extends Reader> source) default TparseResource(@NonNull Class<?> type, @NonNull String name, @NonNull Charset encoding) parseStream(@NonNull InputStream resource, @NonNull Charset encoding) default TparseStream(@NonNull IOSupplier<? extends InputStream> source, @NonNull Charset encoding)
-
Method Details
-
parseChars
- Throws:
IOException
-
parseFile
@NonNull default T parseFile(@NonNull @NonNull File source, @NonNull @NonNull Charset encoding) throws IOException - Throws:
IOException
-
parsePath
@NonNull default T parsePath(@NonNull @NonNull Path source, @NonNull @NonNull Charset encoding) throws IOException - Throws:
IOException
-
parseResource
@NonNull default T parseResource(@NonNull @NonNull Class<?> type, @NonNull @NonNull String name, @NonNull @NonNull Charset encoding) throws IOException - Throws:
IOException
-
parseReader
@NonNull default T parseReader(@NonNull @NonNull IOSupplier<? extends Reader> source) throws IOException - Throws:
IOException
-
parseStream
@NonNull default T parseStream(@NonNull @NonNull IOSupplier<? extends InputStream> source, @NonNull @NonNull Charset encoding) throws IOException - Throws:
IOException
-
parseReader
- Throws:
IOException
-
parseStream
@NonNull T parseStream(@NonNull @NonNull InputStream resource, @NonNull @NonNull Charset encoding) throws IOException - Throws:
IOException
-
andThen
@NonNull default <V> @NonNull TextParser<V> andThen(@NonNull @NonNull IOFunction<? super T, ? extends V> after) -
asFileParser
-
asParser
-
asParser
-
onParsingReader
@NonNull static <T> @NonNull TextParser<T> onParsingReader(@NonNull @NonNull IOFunction<? super Reader, ? extends T> function) -
onParsingLines
@NonNull static <T> @NonNull TextParser<T> onParsingLines(@NonNull @NonNull Function<? super Stream<String>, ? extends T> function)
-