public void setComment(String comment) {
        // Android-changed: Explicitly allow null comments (or allow comments to be
        // cleared).
        if (comment == null) {
            this.comment = null;
            return;
        }

        // Android-changed: Explicitly use UTF-8.
        if (comment.getBytes(StandardCharsets.UTF_8).length > 0xffff) {
            throw new IllegalArgumentException(comment + " too long: " +
                    comment.getBytes(StandardCharsets.UTF_8).length);
        }
        this.comment = comment;
    }
public void setComment ( String comment ) { if ( comment == null ) { this . comment = null ; return ; } if ( comment . getBytes ( StandardCharsets . UTF_8 ) . length > 0xffff ) { throw new IllegalArgumentException ( comment + " too long: " + comment . getBytes ( StandardCharsets . UTF_8 ) . length ) ; } this . comment = comment ; }
Sets the optional comment string for the entry.

<p>ZIP entry comments have maximum length of 0xffff. If the length of the
specified comment string is greater than 0xFFFF bytes after encoding, only
the first 0xFFFF bytes are output to the ZIP file entry.

@param comment the comment string

@see #getComment()