Package | Description |
---|---|
com.google.common.io |
This package contains utility methods and classes for working with Java I/O;
for example input streams, output streams, readers, writers, and files.
|
Modifier and Type | Class and Description |
---|---|
class |
ByteSink
A destination to which bytes can be written, such as a file.
|
class |
CharSink
A destination to which characters can be written, such as a text file.
|
Modifier and Type | Method and Description |
---|---|
static OutputSupplier<FileOutputStream> |
Files.newOutputStreamSupplier(File file)
Deprecated.
Use
#asByteSink(File) . This method is scheduled for
removal in Guava 18.0. |
static OutputSupplier<FileOutputStream> |
Files.newOutputStreamSupplier(File file,
boolean append)
Deprecated.
Use
Files.asByteSink(File, FileWriteMode...) , passing
FileWriteMode.APPEND for append. This method is scheduled for
removal in Guava 18.0. |
static OutputSupplier<OutputStreamWriter> |
Files.newWriterSupplier(File file,
Charset charset)
Deprecated.
Use
#asCharSink(File, Charset) . This method is
scheduled for removal in Guava 18.0. |
static OutputSupplier<OutputStreamWriter> |
Files.newWriterSupplier(File file,
Charset charset,
boolean append)
Deprecated.
Use
Files.asCharSink(File, Charset, FileWriteMode...) ,
passing FileWriteMode.APPEND for append. This method is
scheduled for removal in Guava 18.0. |
static OutputSupplier<OutputStreamWriter> |
CharStreams.newWriterSupplier(OutputSupplier<? extends OutputStream> out,
Charset charset)
Deprecated.
Use
ByteSink.asCharSink(Charset) instead. This method
is scheduled for removal in Guava 18.0. |
Modifier and Type | Method and Description |
---|---|
static ByteSink |
ByteStreams.asByteSink(OutputSupplier<? extends OutputStream> supplier)
Deprecated.
Convert all
OutputSupplier<? extends OutputStream>
implementations to extend ByteSink or provide a method for
viewing the object as a ByteSink . This method is scheduled
for removal in Guava 18.0. |
static CharSink |
CharStreams.asCharSink(OutputSupplier<? extends Appendable> supplier)
Deprecated.
Convert all
OutputSupplier<? extends Appendable>
implementations to extend CharSink or provide a method for
viewing the object as a CharSink . This method is scheduled
for removal in Guava 18.0. |
static <W extends Appendable & Closeable> |
Files.copy(File from,
Charset charset,
OutputSupplier<W> to)
Deprecated.
Use
Files.asCharSource(from, charset).copyTo(to) after
changing to to a CharSink if necessary. This method is
scheduled to be removed in Guava 18.0. |
static void |
Files.copy(File from,
OutputSupplier<? extends OutputStream> to)
Deprecated.
Use
Files.asByteSource(from).copyTo(to) after changing
to to a ByteSink if necessary. This method is
scheduled to be removed in Guava 18.0. |
static long |
ByteStreams.copy(InputStream from,
OutputSupplier<? extends OutputStream> to)
Deprecated.
Use
ByteSink.writeFrom(InputStream) instead. This
method is scheduled for removal in Guava 18.0. |
static long |
ByteStreams.copy(InputSupplier<? extends InputStream> from,
OutputSupplier<? extends OutputStream> to)
Deprecated.
Use
ByteSource.copyTo(ByteSink) instead. This method
is scheduled for removal in Guava 18.0. |
static <R extends Readable & Closeable,W extends Appendable & Closeable> |
CharStreams.copy(InputSupplier<R> from,
OutputSupplier<W> to)
Deprecated.
Use
CharSource.copyTo(CharSink) instead. This method is
scheduled for removal in Guava 18.0. |
static OutputSupplier<OutputStreamWriter> |
CharStreams.newWriterSupplier(OutputSupplier<? extends OutputStream> out,
Charset charset)
Deprecated.
Use
ByteSink.asCharSink(Charset) instead. This method
is scheduled for removal in Guava 18.0. |
static void |
ByteStreams.write(byte[] from,
OutputSupplier<? extends OutputStream> to)
Deprecated.
Use
ByteSink.write(byte[]) instead. This method is
scheduled for removal in Guava 18.0. |
static <W extends Appendable & Closeable> |
CharStreams.write(CharSequence from,
OutputSupplier<W> to)
Deprecated.
Use
CharSink.write(CharSequence) instead. This method
is scheduled for removal in Guava 18.0. |
Copyright © 2010-2014. All Rights Reserved.