From c9efc479950e40be4a11daa707dcf9258745cc2e Mon Sep 17 00:00:00 2001 From: Tiramisu Mokka Date: Mon, 26 Jun 2023 09:39:54 -0700 Subject: [PATCH] Describe alternative for `ByteStreams#copy`. Fixes #5706 RELNOTES=n/a PiperOrigin-RevId: 543462774 --- android/guava/src/com/google/common/io/ByteStreams.java | 3 +++ guava/src/com/google/common/io/ByteStreams.java | 3 +++ 2 files changed, 6 insertions(+) diff --git a/android/guava/src/com/google/common/io/ByteStreams.java b/android/guava/src/com/google/common/io/ByteStreams.java index dcd0d48221f6..640bc8bfc01a 100644 --- a/android/guava/src/com/google/common/io/ByteStreams.java +++ b/android/guava/src/com/google/common/io/ByteStreams.java @@ -100,6 +100,9 @@ private ByteStreams() {} * Copies all bytes from the input stream to the output stream. Does not close or flush either * stream. * + *

Java 9 users and later: this method should be treated as deprecated; use the + * equivalent {@link InputStream#transferTo} method instead. + * * @param from the input stream to read from * @param to the output stream to write to * @return the number of bytes copied diff --git a/guava/src/com/google/common/io/ByteStreams.java b/guava/src/com/google/common/io/ByteStreams.java index dcd0d48221f6..640bc8bfc01a 100644 --- a/guava/src/com/google/common/io/ByteStreams.java +++ b/guava/src/com/google/common/io/ByteStreams.java @@ -100,6 +100,9 @@ private ByteStreams() {} * Copies all bytes from the input stream to the output stream. Does not close or flush either * stream. * + *

Java 9 users and later: this method should be treated as deprecated; use the + * equivalent {@link InputStream#transferTo} method instead. + * * @param from the input stream to read from * @param to the output stream to write to * @return the number of bytes copied