Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 67B65200CC2 for ; Wed, 5 Jul 2017 17:34:23 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 66249163A80; Wed, 5 Jul 2017 15:34:23 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id ABEF8163A7D for ; Wed, 5 Jul 2017 17:34:22 +0200 (CEST) Received: (qmail 35419 invoked by uid 500); 5 Jul 2017 15:34:21 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 35383 invoked by uid 99); 5 Jul 2017 15:34:21 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Jul 2017 15:34:21 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id D58F5E96AC; Wed, 5 Jul 2017 15:34:20 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: bodewig@apache.org To: commits@commons.apache.org Date: Wed, 05 Jul 2017 15:34:24 -0000 Message-Id: <79cca8aefc704572bda46e40cc610a42@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [05/12] commons-compress git commit: javadoc for HasCharset archived-at: Wed, 05 Jul 2017 15:34:23 -0000 javadoc for HasCharset Signed-off-by: Simon Spero (cherry picked from commit b70c7c2) Signed-off-by: Simon Spero Project: http://git-wip-us.apache.org/repos/asf/commons-compress/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-compress/commit/cb590b38 Tree: http://git-wip-us.apache.org/repos/asf/commons-compress/tree/cb590b38 Diff: http://git-wip-us.apache.org/repos/asf/commons-compress/diff/cb590b38 Branch: refs/heads/master Commit: cb590b38af2827acb4dc5ab3919415d3cc75d88c Parents: cec72ce Author: Simon Spero Authored: Sat Jun 17 12:45:44 2017 -0400 Committer: Stefan Bodewig Committed: Wed Jul 5 16:30:00 2017 +0200 ---------------------------------------------------------------------- .../commons/compress/archivers/zip/HasCharset.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/commons-compress/blob/cb590b38/src/main/java/org/apache/commons/compress/archivers/zip/HasCharset.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/HasCharset.java b/src/main/java/org/apache/commons/compress/archivers/zip/HasCharset.java index 09dfced..2e392a8 100644 --- a/src/main/java/org/apache/commons/compress/archivers/zip/HasCharset.java +++ b/src/main/java/org/apache/commons/compress/archivers/zip/HasCharset.java @@ -2,10 +2,22 @@ package org.apache.commons.compress.archivers.zip; import java.nio.charset.Charset; +/** + * An interface added to allow access to the character set associated with an {@link NioZipEncoding}, + * without requiring a new method to be added to {@link ZipEncoding}. + *

+ * This avoids introducing a + * potentially breaking change, or making {@link NioZipEncoding} a public class. + *

+ */ public interface HasCharset { /** - * + * Provides access to the character set associated with an object. + *

+ * This allows nio oriented code to use more natural character encoding/decoding methods, + * whilst allowing existing code to continue to rely on special-case error handling for UTF-8. + *

* @return the character set associated with this object */ Charset getCharset();