Пример #1
0
 /**
  * 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
  * @deprecated Use {@link ByteSource#asCharSource(Charset)} instead. This method is scheduled for
  *     removal in Guava 18.0.
  */
 @Deprecated
 public static InputSupplier<InputStreamReader> newReaderSupplier(
     final InputSupplier<? extends InputStream> in, final Charset charset) {
   return asInputSupplier(ByteStreams.asByteSource(in).asCharSource(charset));
 }
Пример #2
0
 /**
  * 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));
 }