Skip to content

Commit

Permalink
Document the JDK 9+ alternative to ByteStreams#toByteArray
Browse files Browse the repository at this point in the history
Fixes #6915

RELNOTES=n/a
PiperOrigin-RevId: 599226558
  • Loading branch information
Stephan202 authored and Google Java Core Libraries committed Jan 17, 2024
1 parent a5200a3 commit 8481d33
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions android/guava/src/com/google/common/io/ByteStreams.java
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,8 @@ private static byte[] combineBuffers(Queue<byte[]> bufs, int totalLen) {
/**
* Reads all bytes from an input stream into a byte array. Does not close the stream.
*
* <p><b>Java 9+ users:</b> use {@code in#readAllBytes()} instead.
*
* @param in the input stream to read from
* @return a byte array containing all the bytes from the stream
* @throws IOException if an I/O error occurs
Expand Down
2 changes: 2 additions & 0 deletions guava/src/com/google/common/io/ByteStreams.java
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,8 @@ private static byte[] combineBuffers(Queue<byte[]> bufs, int totalLen) {
/**
* Reads all bytes from an input stream into a byte array. Does not close the stream.
*
* <p><b>Java 9+ users:</b> use {@code in#readAllBytes()} instead.
*
* @param in the input stream to read from
* @return a byte array containing all the bytes from the stream
* @throws IOException if an I/O error occurs
Expand Down

1 comment on commit 8481d33

@SteveBombardier

This comment was marked as spam.

Please sign in to comment.