mirror of
https://github.com/floci-io/floci.git
synced 2026-11-27 07:39:24 -05:00
docs(ssm): match BoundedOutputCollector Javadoc to its write path (#4297)
The class Javadoc said bytes after the cap are decoded and discarded, but write returns before decoding once the cap is reached. Describe what the code does.
This commit is contained in:
1 parent
babb43ac3d
commit
db73026a35
1 file changed
+3
-2
@@ -8,8 +8,9 @@ import java.nio.charset.StandardCharsets;
|
||||
|
||||
/**
|
||||
* Accumulates UTF-8 bytes into a character buffer bounded to a maximum number of characters.
|
||||
* Bytes received after the cap is reached are decoded and discarded rather than retained, so
|
||||
* memory stays proportional to {@code maxChars} regardless of how much input is fed in.
|
||||
* Once the cap is reached, later {@link #write(byte[])} calls return without decoding their
|
||||
* bytes, so memory stays proportional to {@code maxChars} regardless of how much input is fed
|
||||
* in. Callers can keep writing after the cap to drain their source stream.
|
||||
*
|
||||
* <p>Handles a multi-byte UTF-8 character split across separate {@link #write(byte[])} calls
|
||||
* (e.g. Docker exec stream frames) by carrying any undecoded trailing bytes over to the next
|
||||
|
||||
Reference in new issue
Block a user