/** * Writes a character sequence (such as a string) to an appendable * object from the given supplier. * * @param from the character sequence to write * @param to the output supplier * @throws IOException if an I/O error occurs */ public static <W extends Appendable & Closeable> void write(CharSequence from, OutputSupplier<W> to) throws IOException { asCharSink(to).write(from); }
/** * Writes a character sequence (such as a string) to an appendable * object from the given supplier. * * @param from the character sequence to write * @param to the output supplier * @throws IOException if an I/O error occurs */ public static <W extends Appendable & Closeable> void write(CharSequence from, OutputSupplier<W> to) throws IOException { asCharSink(to).write(from); }
/** * Writes a character sequence (such as a string) to an appendable * object from the given supplier. * * @param from the character sequence to write * @param to the output supplier * @throws IOException if an I/O error occurs */ public static <W extends Appendable & Closeable> void write(CharSequence from, OutputSupplier<W> to) throws IOException { asCharSink(to).write(from); }
/** * Writes a character sequence (such as a string) to an appendable * object from the given supplier. * * @param from the character sequence to write * @param to the output supplier * @throws IOException if an I/O error occurs */ public static <W extends Appendable & Closeable> void write(CharSequence from, OutputSupplier<W> to) throws IOException { asCharSink(to).write(from); }
/** * Writes a character sequence (such as a string) to an appendable * object from the given supplier. * * @param from the character sequence to write * @param to the output supplier * @throws IOException if an I/O error occurs */ public static <W extends Appendable & Closeable> void write(CharSequence from, OutputSupplier<W> to) throws IOException { asCharSink(to).write(from); }
/** * Writes a character sequence (such as a string) to an appendable * object from the given supplier. * * @param from the character sequence to write * @param to the output supplier * @throws IOException if an I/O error occurs * @deprecated Use {@link CharSink#write(CharSequence)} instead. This method * is scheduled for removal in Guava 18.0. */ @Deprecated public static <W extends Appendable & Closeable> void write(CharSequence from, OutputSupplier<W> to) throws IOException { asCharSink(to).write(from); }
/** * Writes a character sequence (such as a string) to an appendable * object from the given supplier. * * @param from the character sequence to write * @param to the output supplier * @throws IOException if an I/O error occurs * @deprecated Use {@link CharSink#write(CharSequence)} instead. This method * is scheduled for removal in Guava 18.0. */ @Deprecated public static <W extends Appendable & Closeable> void write(CharSequence from, OutputSupplier<W> to) throws IOException { asCharSink(to).write(from); }
/** * Opens {@link Readable} and {@link Appendable} objects from the * given factories, copies all characters between the two, and closes * them. * * @param from the input factory * @param to the output factory * @return the number of characters copied * @throws IOException if an I/O error occurs * @deprecated Use {@link CharSource#copyTo(CharSink)} instead. This method is * scheduled for removal in Guava 18.0. */ @Deprecated public static <R extends Readable & Closeable, W extends Appendable & Closeable> long copy(InputSupplier<R> from, OutputSupplier<W> to) throws IOException { return asCharSource(from).copyTo(asCharSink(to)); }
/** * Opens {@link Readable} and {@link Appendable} objects from the * given factories, copies all characters between the two, and closes * them. * * @param from the input factory * @param to the output factory * @return the number of characters copied * @throws IOException if an I/O error occurs */ public static <R extends Readable & Closeable, W extends Appendable & Closeable> long copy(InputSupplier<R> from, OutputSupplier<W> to) throws IOException { return asCharSource(from).copyTo(asCharSink(to)); }
/** * Opens {@link Readable} and {@link Appendable} objects from the * given factories, copies all characters between the two, and closes * them. * * @param from the input factory * @param to the output factory * @return the number of characters copied * @throws IOException if an I/O error occurs */ public static <R extends Readable & Closeable, W extends Appendable & Closeable> long copy(InputSupplier<R> from, OutputSupplier<W> to) throws IOException { return asCharSource(from).copyTo(asCharSink(to)); }
/** * Opens {@link Readable} and {@link Appendable} objects from the * given factories, copies all characters between the two, and closes * them. * * @param from the input factory * @param to the output factory * @return the number of characters copied * @throws IOException if an I/O error occurs * @deprecated Use {@link CharSource#copyTo(CharSink) instead. This method is * scheduled for removal in Guava 18.0. */ @Deprecated public static <R extends Readable & Closeable, W extends Appendable & Closeable> long copy(InputSupplier<R> from, OutputSupplier<W> to) throws IOException { return asCharSource(from).copyTo(asCharSink(to)); }
/** * Copies all characters from a file to a {@link Appendable} & * {@link Closeable} object supplied by a factory, using the given * character set. * * @param from the source file * @param charset the charset used to decode the input stream; see {@link * Charsets} for helpful predefined constants * @param to the appendable supplier * @throws IOException if an I/O error occurs * @deprecated Use {@code Files.asCharSource(from, charset).copyTo(to)} after * changing {@code to} to a {@code CharSink} if necessary. This method is * scheduled to be removed in Guava 18.0. */ @Deprecated public static <W extends Appendable & Closeable> void copy(File from, Charset charset, OutputSupplier<W> to) throws IOException { asCharSource(from, charset).copyTo(CharStreams.asCharSink(to)); }
/** * Copies all characters from a file to a {@link Appendable} & * {@link Closeable} object supplied by a factory, using the given * character set. * * @param from the source file * @param charset the charset used to decode the input stream; see {@link * Charsets} for helpful predefined constants * @param to the appendable supplier * @throws IOException if an I/O error occurs */ public static <W extends Appendable & Closeable> void copy(File from, Charset charset, OutputSupplier<W> to) throws IOException { asCharSource(from, charset).copyTo(CharStreams.asCharSink(to)); }
/** * Opens {@link Readable} and {@link Appendable} objects from the * given factories, copies all characters between the two, and closes * them. * * @param from the input factory * @param to the output factory * @return the number of characters copied * @throws IOException if an I/O error occurs */ public static <R extends Readable & Closeable, W extends Appendable & Closeable> long copy(InputSupplier<R> from, OutputSupplier<W> to) throws IOException { return asCharSource(from).copyTo(asCharSink(to)); }
/** * Copies all characters from a file to a {@link Appendable} & * {@link Closeable} object supplied by a factory, using the given * character set. * * @param from the source file * @param charset the charset used to decode the input stream; see {@link * Charsets} for helpful predefined constants * @param to the appendable supplier * @throws IOException if an I/O error occurs */ public static <W extends Appendable & Closeable> void copy(File from, Charset charset, OutputSupplier<W> to) throws IOException { asCharSource(from, charset).copyTo(CharStreams.asCharSink(to)); }
/** * Opens {@link Readable} and {@link Appendable} objects from the * given factories, copies all characters between the two, and closes * them. * * @param from the input factory * @param to the output factory * @return the number of characters copied * @throws IOException if an I/O error occurs */ public static <R extends Readable & Closeable, W extends Appendable & Closeable> long copy(InputSupplier<R> from, OutputSupplier<W> to) throws IOException { return asCharSource(from).copyTo(asCharSink(to)); }
/** * Copies all characters from a file to a {@link Appendable} & * {@link Closeable} object supplied by a factory, using the given * character set. * * @param from the source file * @param charset the charset used to decode the input stream; see {@link * Charsets} for helpful predefined constants * @param to the appendable supplier * @throws IOException if an I/O error occurs */ public static <W extends Appendable & Closeable> void copy(File from, Charset charset, OutputSupplier<W> to) throws IOException { asCharSource(from, charset).copyTo(CharStreams.asCharSink(to)); }
/** * Copies all characters from a file to a {@link Appendable} & * {@link Closeable} object supplied by a factory, using the given * character set. * * @param from the source file * @param charset the charset used to decode the input stream; see {@link * Charsets} for helpful predefined constants * @param to the appendable supplier * @throws IOException if an I/O error occurs */ public static <W extends Appendable & Closeable> void copy(File from, Charset charset, OutputSupplier<W> to) throws IOException { asCharSource(from, charset).copyTo(CharStreams.asCharSink(to)); }
/** * Copies all characters from a file to a {@link Appendable} & * {@link Closeable} object supplied by a factory, using the given * character set. * * @param from the source file * @param charset the charset used to decode the input stream; see {@link * Charsets} for helpful predefined constants * @param to the appendable supplier * @throws IOException if an I/O error occurs */ public static <W extends Appendable & Closeable> void copy(File from, Charset charset, OutputSupplier<W> to) throws IOException { asCharSource(from, charset).copyTo(CharStreams.asCharSink(to)); }
/** * Opens {@link Readable} and {@link Appendable} objects from the * given factories, copies all characters between the two, and closes * them. * * @param from the input factory * @param to the output factory * @return the number of characters copied * @throws IOException if an I/O error occurs */ public static <R extends Readable & Closeable, W extends Appendable & Closeable> long copy(InputSupplier<R> from, OutputSupplier<W> to) throws IOException { return asCharSource(from).copyTo(asCharSink(to)); }