Copilot commented on code in PR #442:
URL: https://github.com/apache/commons-codec/pull/442#discussion_r3998166931


##########
src/main/java/org/apache/commons/codec/binary/Base45OutputStream.java:
##########
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.codec.binary;
+
+import java.io.OutputStream;
+
+/**
+ * Provides <a href="https://datatracker.ietf.org/doc/html/rfc9285";>RFC 9285 
Base45</a> encoding in a streaming fashion (unlimited size).
+ * <p>
+ * <strong>Note:</strong> It is mandatory to close the stream after the last 
byte has been written to it, otherwise the final padding will be omitted and the
+ * resulting data will be incomplete/inconsistent.

Review Comment:
   Base45 has no padding, so this note describes a character the codec never 
emits. It also makes `close()` sound mandatory even though 
`BaseNCodecOutputStream.eof()` is the supported way to flush the final partial 
block without closing the wrapped stream; document `close()`/`eof()` and the 
partial block instead.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to