You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by gg...@apache.org on 2012/11/26 22:32:16 UTC
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/
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
* <code>Content-Type</code> 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
* <code>Content-Type</code> 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 <code>Content-Type</code> value from {@link HttpEntity} or returns default value
- * if not explicitly specified.
+ * Extracts <code>Content-Type</code> 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
* <code>Content-Type</code> 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 {