/** * 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 asInputSupplier(CharSource.wrap(value)); }
/** * Returns a factory that will supply instances of * {@link InputStreamReader} that read a file using the given character set. * * @param file the file to read from * @param charset the charset used to decode the input stream; see {@link * Charsets} for helpful predefined constants * @return the factory */ public static InputSupplier<InputStreamReader> newReaderSupplier(File file, Charset charset) { return CharStreams.asInputSupplier(asCharSource(file, charset)); }
/** * Returns a factory that will supply instances of * {@link InputStreamReader} that read a URL using the given character set. * * @param url the URL to read from * @param charset the charset used to decode the input stream; see {@link * Charsets} for helpful predefined constants * @return the factory */ public static InputSupplier<InputStreamReader> newReaderSupplier( URL url, Charset charset) { return CharStreams.asInputSupplier(asCharSource(url, charset)); }
/** * Returns a factory that will supply instances of * {@link InputStreamReader} that read a file using the given character set. * * @param file the file to read from * @param charset the charset used to decode the input stream; see {@link * Charsets} for helpful predefined constants * @return the factory */ public static InputSupplier<InputStreamReader> newReaderSupplier(File file, Charset charset) { return CharStreams.asInputSupplier(asCharSource(file, charset)); }
/** * 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 asInputSupplier(CharSource.wrap(value)); }
/** * 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 asInputSupplier(CharSource.wrap(value)); }
/** * 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 asInputSupplier(CharSource.wrap(value)); }
/** * 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 a factory that will supply instances of * {@link InputStreamReader} that read a URL using the given character set. * * @param url the URL to read from * @param charset the charset used to decode the input stream; see {@link * Charsets} for helpful predefined constants * @return the factory */ public static InputSupplier<InputStreamReader> newReaderSupplier( URL url, Charset charset) { return CharStreams.asInputSupplier(asCharSource(url, charset)); }
/** * Returns a factory that will supply instances of * {@link InputStreamReader} that read a URL using the given character set. * * @param url the URL to read from * @param charset the charset used to decode the input stream; see {@link * Charsets} for helpful predefined constants * @return the factory */ public static InputSupplier<InputStreamReader> newReaderSupplier( URL url, Charset charset) { return CharStreams.asInputSupplier(asCharSource(url, charset)); }
/** * Returns a factory that will supply instances of * {@link InputStreamReader} that read a URL using the given character set. * * @param url the URL to read from * @param charset the charset used to decode the input stream; see {@link * Charsets} for helpful predefined constants * @return the factory */ public static InputSupplier<InputStreamReader> newReaderSupplier( URL url, Charset charset) { return CharStreams.asInputSupplier(asCharSource(url, charset)); }
/** * Returns a factory that will supply instances of * {@link InputStreamReader} that read a file using the given character set. * * @param file the file to read from * @param charset the charset used to decode the input stream; see {@link * Charsets} for helpful predefined constants * @return the factory */ public static InputSupplier<InputStreamReader> newReaderSupplier(File file, Charset charset) { return CharStreams.asInputSupplier(asCharSource(file, charset)); }
/** * Returns a factory that will supply instances of * {@link InputStreamReader} that read a file using the given character set. * * @param file the file to read from * @param charset the charset used to decode the input stream; see {@link * Charsets} for helpful predefined constants * @return the factory */ public static InputSupplier<InputStreamReader> newReaderSupplier(File file, Charset charset) { return CharStreams.asInputSupplier(asCharSource(file, charset)); }
/** * Returns a factory that will supply instances of * {@link InputStreamReader} that read a file using the given character set. * * @param file the file to read from * @param charset the charset used to decode the input stream; see {@link * Charsets} for helpful predefined constants * @return the factory */ public static InputSupplier<InputStreamReader> newReaderSupplier(File file, Charset charset) { return CharStreams.asInputSupplier(asCharSource(file, charset)); }
/** * Returns a factory that will supply instances of * {@link InputStreamReader} that read a URL using the given character set. * * @param url the URL to read from * @param charset the charset used to decode the input stream; see {@link * Charsets} for helpful predefined constants * @return the factory */ public static InputSupplier<InputStreamReader> newReaderSupplier( URL url, Charset charset) { return CharStreams.asInputSupplier(asCharSource(url, charset)); }
/** * Returns a factory that will supply instances of {@link StringReader} that * read a string value. * * @param value the string to read * @return the factory * @deprecated Use {@link CharSource#wrap(CharSequence)} instead. This method * is scheduled for removal in Guava 18.0. */ @Deprecated public static InputSupplier<StringReader> newReaderSupplier( final String value) { return asInputSupplier(CharSource.wrap(value)); }
/** * Returns a factory that will supply instances of {@link InputStreamReader}, * using the given {@link InputStream} factory and character set. * * @param in the factory that will be used to open input streams * @param charset the charset used to decode the input stream; see {@link * Charsets} for helpful predefined constants * @return the factory */ public static InputSupplier<InputStreamReader> newReaderSupplier( final InputSupplier<? extends InputStream> in, final Charset charset) { return asInputSupplier( ByteStreams.asByteSource(in).asCharSource(charset)); }
/** * Returns a factory that will supply instances of {@link InputStreamReader}, * using the given {@link InputStream} factory and character set. * * @param in the factory that will be used to open input streams * @param charset the charset used to decode the input stream; see {@link * Charsets} for helpful predefined constants * @return the factory */ public static InputSupplier<InputStreamReader> newReaderSupplier( final InputSupplier<? extends InputStream> in, final Charset charset) { return asInputSupplier( ByteStreams.asByteSource(in).asCharSource(charset)); }
/** * Returns a factory that will supply instances of {@link InputStreamReader}, * using the given {@link InputStream} factory and character set. * * @param in the factory that will be used to open input streams * @param charset the charset used to decode the input stream; see {@link * Charsets} for helpful predefined constants * @return the factory */ public static InputSupplier<InputStreamReader> newReaderSupplier( final InputSupplier<? extends InputStream> in, final Charset charset) { return asInputSupplier( ByteStreams.asByteSource(in).asCharSource(charset)); }
/** * Returns a factory that will supply instances of {@link InputStreamReader}, * using the given {@link InputStream} factory and character set. * * @param in the factory that will be used to open input streams * @param charset the charset used to decode the input stream; see {@link * Charsets} for helpful predefined constants * @return the factory */ public static InputSupplier<InputStreamReader> newReaderSupplier( final InputSupplier<? extends InputStream> in, final Charset charset) { return asInputSupplier( ByteStreams.asByteSource(in).asCharSource(charset)); }