/** * Wraps the specified input object into a {@link ParserPipe} object so that it can be easily converted into * a stream or reader. * * @param input * The input. * <br>This can be any of the following types: * <ul> * <li><jk>null</jk> * <li>{@link Reader} * <li>{@link CharSequence} * <li>{@link InputStream} containing UTF-8 encoded text (or whatever the encoding specified by * {@link ReaderParser#RPARSER_inputStreamCharset}). * <li><code><jk>byte</jk>[]</code> containing UTF-8 encoded text (or whatever the encoding specified by * {@link ReaderParser#RPARSER_inputStreamCharset}). * <li>{@link File} containing system encoded text (or whatever the encoding specified by * {@link ReaderParser#RPARSER_fileCharset}). * </ul> * @return * A new {@link ParserPipe} wrapper around the specified input object. */ @SuppressWarnings("resource") @Override /* ParserSesson */ public final ParserPipe createPipe(Object input) { return setPipe(new ParserPipe(input, isDebug(), ctx.isStrict(), ctx.isAutoCloseStreams(), ctx.isUnbuffered(), getFileCharset(), getInputStreamCharset())); }
/** * Wraps the specified input object into a {@link ParserPipe} object so that it can be easily converted into * a stream or reader. * * @param input * The input. * <br>This can be any of the following types: * <ul> * <li><jk>null</jk> * <li>{@link Reader} * <li>{@link CharSequence} * <li>{@link InputStream} containing UTF-8 encoded text (or whatever the encoding specified by * {@link ReaderParser#RPARSER_inputStreamCharset}). * <li><code><jk>byte</jk>[]</code> containing UTF-8 encoded text (or whatever the encoding specified by * {@link ReaderParser#RPARSER_inputStreamCharset}). * <li>{@link File} containing system encoded text (or whatever the encoding specified by * {@link ReaderParser#RPARSER_fileCharset}). * </ul> * @return * A new {@link ParserPipe} wrapper around the specified input object. */ @SuppressWarnings("resource") @Override /* ParserSesson */ public final ParserPipe createPipe(Object input) { return setPipe(new ParserPipe(input, isDebug(), ctx.isStrict(), ctx.isAutoCloseStreams(), ctx.isUnbuffered(), getFileCharset(), getInputStreamCharset())); }
/** * Wraps the specified input object into a {@link ParserPipe} object so that it can be easily converted into * a stream or reader. * * @param input * The input. * <br>This can be any of the following types: * <ul> * <li><jk>null</jk> * <li>{@link Reader} * <li>{@link CharSequence} * <li>{@link InputStream} containing UTF-8 encoded text (or whatever the encoding specified by * {@link ReaderParser#RPARSER_inputStreamCharset}). * <li><code><jk>byte</jk>[]</code> containing UTF-8 encoded text (or whatever the encoding specified by * {@link ReaderParser#RPARSER_inputStreamCharset}). * <li>{@link File} containing system encoded text (or whatever the encoding specified by * {@link ReaderParser#RPARSER_fileCharset}). * </ul> * @return * A new {@link ParserPipe} wrapper around the specified input object. */ @SuppressWarnings("resource") @Override /* ParserSesson */ public final ParserPipe createPipe(Object input) { return setPipe(new ParserPipe(input, isDebug(), ctx.isStrict(), ctx.isAutoCloseStreams(), ctx.isUnbuffered(), getFileCharset(), getInputStreamCharset())); }