Return-Path: X-Original-To: apmail-hc-commits-archive@www.apache.org Delivered-To: apmail-hc-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0579DE53D for ; Mon, 26 Nov 2012 21:32:42 +0000 (UTC) Received: (qmail 44145 invoked by uid 500); 26 Nov 2012 21:32:42 -0000 Delivered-To: apmail-hc-commits-archive@hc.apache.org Received: (qmail 44120 invoked by uid 500); 26 Nov 2012 21:32:41 -0000 Mailing-List: contact commits-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list commits@hc.apache.org Received: (qmail 44113 invoked by uid 99); 26 Nov 2012 21:32:41 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Nov 2012 21:32:41 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Nov 2012 21:32:38 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 773BC238897F for ; Mon, 26 Nov 2012 21:32:17 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1413870 - in /httpcomponents/httpcore/trunk: httpcore-nio/src/main/java/org/apache/http/nio/entity/ httpcore/src/main/java/org/apache/http/entity/ httpcore/src/main/java/org/apache/http/util/ Date: Mon, 26 Nov 2012 21:32:16 -0000 To: commits@hc.apache.org From: ggregory@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20121126213217.773BC238897F@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: ggregory Date: Mon Nov 26 21:32:15 2012 New Revision: 1413870 URL: http://svn.apache.org/viewvc?rev=1413870&view=rev Log: Add missing Javadoc related to [HTTPCORE-323]: Undocumented UnsupportedCharsetException org.apache.http.entity.ContentType.getOrDefault. Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/entity/NStringEntity.java httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/ContentType.java httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/StringEntity.java httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/util/EntityUtils.java Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/entity/NStringEntity.java URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/entity/NStringEntity.java?rev=1413870&r1=1413869&r2=1413870&view=diff ============================================================================== --- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/entity/NStringEntity.java (original) +++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/entity/NStringEntity.java Mon Nov 26 21:32:15 2012 @@ -109,7 +109,8 @@ public class NStringEntity extends Abstr * is {@link HTTP#DEF_CONTENT_CHARSET} is assumed * * @throws IllegalArgumentException if the string parameter is null - * @throws UnsupportedEncodingException if the charset is not supported. + * @throws UnsupportedCharsetException Thrown when the named charset is not available in + * this instance of the Java virtual machine */ public NStringEntity(final String s, final String charset) throws UnsupportedEncodingException { Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/ContentType.java URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/ContentType.java?rev=1413870&r1=1413869&r2=1413870&view=diff ============================================================================== --- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/ContentType.java (original) +++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/ContentType.java Mon Nov 26 21:32:15 2012 @@ -168,6 +168,8 @@ public final class ContentType implement * @param charset charset. It may not contain characters <">, <;>, <,> reserved by the HTTP * specification. This parameter is optional. * @return content type + * @throws UnsupportedCharsetException Thrown when the named charset is not available in + * this instance of the Java virtual machine */ public static ContentType create( final String mimeType, final String charset) throws UnsupportedCharsetException { @@ -191,6 +193,8 @@ public final class ContentType implement * @return content type * @throws ParseException if the given text does not represent a valid * Content-Type value. + * @throws UnsupportedCharsetException Thrown when the named charset is not available in + * this instance of the Java virtual machine */ public static ContentType parse( final String s) throws ParseException, UnsupportedCharsetException { @@ -212,6 +216,8 @@ public final class ContentType implement * @return content type * @throws ParseException if the given text does not represent a valid * Content-Type value. + * @throws UnsupportedCharsetException Thrown when the named charset is not available in + * this instance of the Java virtual machine */ public static ContentType get( final HttpEntity entity) throws ParseException, UnsupportedCharsetException { @@ -229,13 +235,15 @@ public final class ContentType implement } /** - * Extracts Content-Type value from {@link HttpEntity} or returns default value - * if not explicitly specified. + * Extracts Content-Type value from {@link HttpEntity} or returns the default value + * {@link #DEFAULT_TEXT} if not explicitly specified. * * @param entity HTTP entity * @return content type * @throws ParseException if the given text does not represent a valid * Content-Type value. + * @throws UnsupportedCharsetException Thrown when the named charset is not available in + * this instance of the Java virtual machine */ public static ContentType getOrDefault( final HttpEntity entity) throws ParseException, UnsupportedCharsetException { @@ -259,6 +267,8 @@ public final class ContentType implement * * @param charset name * @return a new instance with this MIME type and the given Charset name. + * @throws UnsupportedCharsetException Thrown when the named charset is not available in + * this instance of the Java virtual machine * @since 4.3 */ public ContentType withCharset(String charset) { Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/StringEntity.java URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/StringEntity.java?rev=1413870&r1=1413869&r2=1413870&view=diff ============================================================================== --- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/StringEntity.java (original) +++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/StringEntity.java Mon Nov 26 21:32:15 2012 @@ -117,7 +117,8 @@ public class StringEntity extends Abstra * is {@link HTTP#DEF_CONTENT_CHARSET} is assumed * * @throws IllegalArgumentException if the string parameter is null - * @throws UnsupportedEncodingException if the charset is not supported. + * @throws UnsupportedCharsetException Thrown when the named charset is not available in + * this instance of the Java virtual machine */ public StringEntity(final String string, final String charset) throws UnsupportedEncodingException { Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/util/EntityUtils.java URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/util/EntityUtils.java?rev=1413870&r1=1413869&r2=1413870&view=diff ============================================================================== --- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/util/EntityUtils.java (original) +++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/util/EntityUtils.java Mon Nov 26 21:32:15 2012 @@ -205,6 +205,8 @@ public final class EntityUtils { * @throws ParseException if header elements cannot be parsed * @throws IllegalArgumentException if entity is null or if content length > Integer.MAX_VALUE * @throws IOException if an error occurs reading the input stream + * @throws UnsupportedCharsetException Thrown when the named charset is not available in + * this instance of the Java virtual machine */ public static String toString( final HttpEntity entity, final Charset defaultCharset) throws IOException, ParseException { @@ -258,6 +260,8 @@ public final class EntityUtils { * @throws ParseException if header elements cannot be parsed * @throws IllegalArgumentException if entity is null or if content length > Integer.MAX_VALUE * @throws IOException if an error occurs reading the input stream + * @throws UnsupportedCharsetException Thrown when the named charset is not available in + * this instance of the Java virtual machine */ public static String toString( final HttpEntity entity, final String defaultCharset) throws IOException, ParseException { @@ -274,6 +278,8 @@ public final class EntityUtils { * @throws ParseException if header elements cannot be parsed * @throws IllegalArgumentException if entity is null or if content length > Integer.MAX_VALUE * @throws IOException if an error occurs reading the input stream + * @throws UnsupportedCharsetException Thrown when the named charset is not available in + * this instance of the Java virtual machine */ public static String toString(final HttpEntity entity) throws IOException, ParseException {