@Override public CharSource apply(InputSupplier<? extends Reader> input) { return asCharSource(input); } });
@Override public CharSource apply(InputSupplier<? extends Reader> input) { return asCharSource(input); } });
@Override public CharSource apply(InputSupplier<? extends Reader> input) { return asCharSource(input); } });
@Override public CharSource apply(InputSupplier<? extends Reader> input) { return asCharSource(input); } });
@Override public CharSource apply(InputSupplier<? extends Reader> input) { return asCharSource(input); } });
@Override public CharSource apply(InputSupplier<? extends Reader> input) { return asCharSource(input); } });
/** * Returns a factory that will supply instances of {@link StringReader} that * read a string value. * * @param value the string to read * @return the factory */ public static InputSupplier<StringReader> newReaderSupplier( final String value) { return CharStreams.asInputSupplier(asCharSource(value)); }
/** * Returns the characters from a {@link Readable} & {@link Closeable} object * supplied by a factory as a {@link String}. * * @param supplier the factory to read from * @return a string containing all the characters * @throws IOException if an I/O error occurs */ public static <R extends Readable & Closeable> String toString( InputSupplier<R> supplier) throws IOException { return asCharSource(supplier).read(); }
/** * Returns the characters from a {@link Readable} & {@link Closeable} object * supplied by a factory as a {@link String}. * * @param supplier the factory to read from * @return a string containing all the characters * @throws IOException if an I/O error occurs */ public static <R extends Readable & Closeable> String toString( InputSupplier<R> supplier) throws IOException { return asCharSource(supplier).read(); }
/** * Reads the first line from a {@link Readable} & {@link Closeable} object * supplied by a factory. The line does not include line-termination * characters, but does include other leading and trailing whitespace. * * @param supplier the factory to read from * @return the first line, or null if the reader is empty * @throws IOException if an I/O error occurs */ public static <R extends Readable & Closeable> String readFirstLine( InputSupplier<R> supplier) throws IOException { return asCharSource(supplier).readFirstLine(); }
/** * Returns the characters from a {@link Readable} & {@link Closeable} object * supplied by a factory as a {@link String}. * * @param supplier the factory to read from * @return a string containing all the characters * @throws IOException if an I/O error occurs */ public static <R extends Readable & Closeable> String toString( InputSupplier<R> supplier) throws IOException { return asCharSource(supplier).read(); }
/** * Returns the characters from a {@link Readable} & {@link Closeable} object * supplied by a factory as a {@link String}. * * @param supplier the factory to read from * @return a string containing all the characters * @throws IOException if an I/O error occurs */ public static <R extends Readable & Closeable> String toString( InputSupplier<R> supplier) throws IOException { return asCharSource(supplier).read(); }
/** * Returns the characters from a {@link Readable} & {@link Closeable} object * supplied by a factory as a {@link String}. * * @param supplier the factory to read from * @return a string containing all the characters * @throws IOException if an I/O error occurs */ public static <R extends Readable & Closeable> String toString( InputSupplier<R> supplier) throws IOException { return asCharSource(supplier).read(); }
/** * Reads the first line from a {@link Readable} & {@link Closeable} object * supplied by a factory. The line does not include line-termination * characters, but does include other leading and trailing whitespace. * * @param supplier the factory to read from * @return the first line, or null if the reader is empty * @throws IOException if an I/O error occurs */ public static <R extends Readable & Closeable> String readFirstLine( InputSupplier<R> supplier) throws IOException { return asCharSource(supplier).readFirstLine(); }
/** * Reads the first line from a {@link Readable} & {@link Closeable} object * supplied by a factory. The line does not include line-termination * characters, but does include other leading and trailing whitespace. * * @param supplier the factory to read from * @return the first line, or null if the reader is empty * @throws IOException if an I/O error occurs */ public static <R extends Readable & Closeable> String readFirstLine( InputSupplier<R> supplier) throws IOException { return asCharSource(supplier).readFirstLine(); }
/** * Opens a {@link Readable} object from the supplier, copies all characters * to the {@link Appendable} object, and closes the input. Does not close * or flush the output. * * @param from the input factory * @param to the object to write to * @return the number of characters copied * @throws IOException if an I/O error occurs */ public static <R extends Readable & Closeable> long copy( InputSupplier<R> from, Appendable to) throws IOException { return asCharSource(from).copyTo(to); }
/** * Reads the first line from a {@link Readable} & {@link Closeable} object * supplied by a factory. The line does not include line-termination * characters, but does include other leading and trailing whitespace. * * @param supplier the factory to read from * @return the first line, or null if the reader is empty * @throws IOException if an I/O error occurs */ public static <R extends Readable & Closeable> String readFirstLine( InputSupplier<R> supplier) throws IOException { return asCharSource(supplier).readFirstLine(); }
/** * Reads the first line from a {@link Readable} & {@link Closeable} object * supplied by a factory. The line does not include line-termination * characters, but does include other leading and trailing whitespace. * * @param supplier the factory to read from * @return the first line, or null if the reader is empty * @throws IOException if an I/O error occurs */ public static <R extends Readable & Closeable> String readFirstLine( InputSupplier<R> supplier) throws IOException { return asCharSource(supplier).readFirstLine(); }
/** * Opens a {@link Readable} object from the supplier, copies all characters * to the {@link Appendable} object, and closes the input. Does not close * or flush the output. * * @param from the input factory * @param to the object to write to * @return the number of characters copied * @throws IOException if an I/O error occurs */ public static <R extends Readable & Closeable> long copy( InputSupplier<R> from, Appendable to) throws IOException { return asCharSource(from).copyTo(to); }
/** * Opens a {@link Readable} object from the supplier, copies all characters * to the {@link Appendable} object, and closes the input. Does not close * or flush the output. * * @param from the input factory * @param to the object to write to * @return the number of characters copied * @throws IOException if an I/O error occurs */ public static <R extends Readable & Closeable> long copy( InputSupplier<R> from, Appendable to) throws IOException { return asCharSource(from).copyTo(to); }