/** * Returns a factory that will supply instances of {@link OutputStreamWriter}, * using the given {@link OutputStream} factory and character set. * * @param out the factory that will be used to open output streams * @param charset the charset used to encode the output stream; see {@link * Charsets} for helpful predefined constants * @return the factory * @deprecated Use {@link ByteSink#asCharSink(Charset)} instead. This method * is scheduled for removal in Guava 18.0. */ @Deprecated public static OutputSupplier<OutputStreamWriter> newWriterSupplier( final OutputSupplier<? extends OutputStream> out, final Charset charset) { return asOutputSupplier( ByteStreams.asByteSink(out).asCharSink(charset)); }
/** * Returns a factory that will supply instances of {@link OutputStreamWriter} * that write to or append to a file using the given character set. * * @param file the file to write to * @param charset the charset used to encode the output stream; see {@link * Charsets} for helpful predefined constants * @param append if true, the encoded characters will be appended to the file; * otherwise the file is overwritten * @return the factory */ public static OutputSupplier<OutputStreamWriter> newWriterSupplier(File file, Charset charset, boolean append) { return CharStreams.asOutputSupplier(asCharSink(file, charset, modes(append))); }
/** * Returns a factory that will supply instances of {@link OutputStreamWriter}, * using the given {@link OutputStream} factory and character set. * * @param out the factory that will be used to open output streams * @param charset the charset used to encode the output stream; see {@link * Charsets} for helpful predefined constants * @return the factory */ public static OutputSupplier<OutputStreamWriter> newWriterSupplier( final OutputSupplier<? extends OutputStream> out, final Charset charset) { return asOutputSupplier( ByteStreams.asByteSink(out).asCharSink(charset)); }
/** * Returns a factory that will supply instances of {@link OutputStreamWriter}, * using the given {@link OutputStream} factory and character set. * * @param out the factory that will be used to open output streams * @param charset the charset used to encode the output stream; see {@link * Charsets} for helpful predefined constants * @return the factory */ public static OutputSupplier<OutputStreamWriter> newWriterSupplier( final OutputSupplier<? extends OutputStream> out, final Charset charset) { return asOutputSupplier( ByteStreams.asByteSink(out).asCharSink(charset)); }
/** * Returns a factory that will supply instances of {@link OutputStreamWriter} * that write to or append to a file using the given character set. * * @param file the file to write to * @param charset the charset used to encode the output stream; see {@link * Charsets} for helpful predefined constants * @param append if true, the encoded characters will be appended to the file; * otherwise the file is overwritten * @return the factory */ public static OutputSupplier<OutputStreamWriter> newWriterSupplier(File file, Charset charset, boolean append) { return CharStreams.asOutputSupplier(asCharSink(file, charset, modes(append))); }
/** * Returns a factory that will supply instances of {@link OutputStreamWriter} * that write to or append to a file using the given character set. * * @param file the file to write to * @param charset the charset used to encode the output stream; see {@link * Charsets} for helpful predefined constants * @param append if true, the encoded characters will be appended to the file; * otherwise the file is overwritten * @return the factory */ public static OutputSupplier<OutputStreamWriter> newWriterSupplier(File file, Charset charset, boolean append) { return CharStreams.asOutputSupplier(asCharSink(file, charset, modes(append))); }
/** * Returns a factory that will supply instances of {@link OutputStreamWriter}, * using the given {@link OutputStream} factory and character set. * * @param out the factory that will be used to open output streams * @param charset the charset used to encode the output stream; see {@link * Charsets} for helpful predefined constants * @return the factory * @deprecated Use {@link ByteSink#asCharSink(Charset)} instead. This method * is scheduled for removal in Guava 18.0. */ @Deprecated public static OutputSupplier<OutputStreamWriter> newWriterSupplier( final OutputSupplier<? extends OutputStream> out, final Charset charset) { return asOutputSupplier( ByteStreams.asByteSink(out).asCharSink(charset)); }
/** * Returns a factory that will supply instances of {@link OutputStreamWriter}, * using the given {@link OutputStream} factory and character set. * * @param out the factory that will be used to open output streams * @param charset the charset used to encode the output stream; see {@link * Charsets} for helpful predefined constants * @return the factory */ public static OutputSupplier<OutputStreamWriter> newWriterSupplier( final OutputSupplier<? extends OutputStream> out, final Charset charset) { return asOutputSupplier( ByteStreams.asByteSink(out).asCharSink(charset)); }
/** * Returns a factory that will supply instances of {@link OutputStreamWriter}, * using the given {@link OutputStream} factory and character set. * * @param out the factory that will be used to open output streams * @param charset the charset used to encode the output stream; see {@link * Charsets} for helpful predefined constants * @return the factory */ public static OutputSupplier<OutputStreamWriter> newWriterSupplier( final OutputSupplier<? extends OutputStream> out, final Charset charset) { return CharStreams.asOutputSupplier( ByteStreams.asByteSink(out).asCharSink(charset)); }
/** * Returns a factory that will supply instances of {@link OutputStreamWriter}, * using the given {@link OutputStream} factory and character set. * * @param out the factory that will be used to open output streams * @param charset the charset used to encode the output stream; see {@link * Charsets} for helpful predefined constants * @return the factory */ public static OutputSupplier<OutputStreamWriter> newWriterSupplier( final OutputSupplier<? extends OutputStream> out, final Charset charset) { return asOutputSupplier( ByteStreams.asByteSink(out).asCharSink(charset)); }
/** * Returns a factory that will supply instances of {@link OutputStreamWriter} * that write to or append to a file using the given character set. * * @param file the file to write to * @param charset the charset used to encode the output stream; see {@link * Charsets} for helpful predefined constants * @param append if true, the encoded characters will be appended to the file; * otherwise the file is overwritten * @return the factory * @deprecated Use {@link #asCharSink(File, Charset, FileWriteMode...)}, * passing {@link FileWriteMode#APPEND} for append. This method is * scheduled for removal in Guava 18.0. */ @Deprecated public static OutputSupplier<OutputStreamWriter> newWriterSupplier(File file, Charset charset, boolean append) { return CharStreams.asOutputSupplier(asCharSink(file, charset, modes(append))); }
/** * Returns a factory that will supply instances of {@link OutputStreamWriter} * that write to or append to a file using the given character set. * * @param file the file to write to * @param charset the charset used to encode the output stream; see {@link * Charsets} for helpful predefined constants * @param append if true, the encoded characters will be appended to the file; * otherwise the file is overwritten * @return the factory * @deprecated Use {@link #asCharSink(File, Charset, FileWriteMode...)}, * passing {@link FileWriteMode#APPEND} for append. This method is * scheduled for removal in Guava 18.0. */ @Deprecated public static OutputSupplier<OutputStreamWriter> newWriterSupplier(File file, Charset charset, boolean append) { return CharStreams.asOutputSupplier(asCharSink(file, charset, modes(append))); }
/** * Returns a factory that will supply instances of {@link OutputStreamWriter} * that write to or append to a file using the given character set. * * @param file the file to write to * @param charset the charset used to encode the output stream; see {@link * Charsets} for helpful predefined constants * @param append if true, the encoded characters will be appended to the file; * otherwise the file is overwritten * @return the factory */ public static OutputSupplier<OutputStreamWriter> newWriterSupplier(File file, Charset charset, boolean append) { return CharStreams.asOutputSupplier(asCharSink(file, charset, modes(append))); }
/** * Returns a factory that will supply instances of {@link OutputStreamWriter} * that write to or append to a file using the given character set. * * @param file the file to write to * @param charset the charset used to encode the output stream; see {@link * Charsets} for helpful predefined constants * @param append if true, the encoded characters will be appended to the file; * otherwise the file is overwritten * @return the factory */ public static OutputSupplier<OutputStreamWriter> newWriterSupplier(File file, Charset charset, boolean append) { return CharStreams.asOutputSupplier(asCharSink(file, charset, modes(append))); }