summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Mateus Azis <azis@google.com> 2023-11-28 09:19:38 -0800
committer Mateus Azis <azis@google.com> 2023-11-28 09:19:38 -0800
commitdb46cae412b41281871151c438defb98a019b04a (patch)
tree4c7f57dd1c5752ca0c39cdcdec7536709f94e49e
parentc90568455f41959b64644c8345ffead4321fa26b (diff)
Document the of closing LocalSocket streams.
Mention how closing either the input or the output stream closes the entire LocalSocket. Bug: 254066703 Test: N/A Change-Id: Ia85ffaf587d36e2dcadcbaabf85abea102d21704
-rw-r--r--core/java/android/net/LocalSocket.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/java/android/net/LocalSocket.java b/core/java/android/net/LocalSocket.java
index b69410cf7d73..a86396cd7c8d 100644
--- a/core/java/android/net/LocalSocket.java
+++ b/core/java/android/net/LocalSocket.java
@@ -196,7 +196,8 @@ public class LocalSocket implements Closeable {
}
/**
- * Retrieves the input stream for this instance.
+ * Retrieves the input stream for this instance. Closing this stream is equivalent to closing
+ * the entire socket and its associated streams using {@link #close()}.
*
* @return input stream
* @throws IOException if socket has been closed or cannot be created.
@@ -207,7 +208,8 @@ public class LocalSocket implements Closeable {
}
/**
- * Retrieves the output stream for this instance.
+ * Retrieves the output stream for this instance. Closing this stream is equivalent to closing
+ * the entire socket and its associated streams using {@link #close()}.
*
* @return output stream
* @throws IOException if socket has been closed or cannot be created.