Class ContentType
- java.lang.Object
-
- net.lenni0451.commons.httpclient.model.ContentType
-
public class ContentType extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description ContentType(java.lang.String mimeType)ContentType(java.lang.String mimeType, java.lang.String boundary)ContentType(java.lang.String mimeType, java.nio.charset.Charset charset)ContentType(java.lang.String mimeType, java.nio.charset.Charset charset, java.lang.String boundary)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)java.util.Optional<java.lang.String>getBoundary()java.util.Optional<java.nio.charset.Charset>getCharset()java.lang.StringgetMimeType()inthashCode()static ContentTypeparse(java.lang.String contentType)Parse a content type string.java.lang.StringtoString()
-
-
-
Constructor Detail
-
ContentType
public ContentType(java.lang.String mimeType)
-
ContentType
public ContentType(java.lang.String mimeType, @Nullable java.nio.charset.Charset charset)
-
ContentType
public ContentType(java.lang.String mimeType, @Nullable java.lang.String boundary)
-
ContentType
public ContentType(java.lang.String mimeType, @Nullable java.nio.charset.Charset charset, @Nullable java.lang.String boundary)
-
-
Method Detail
-
parse
public static ContentType parse(java.lang.String contentType)
Parse a content type string.- Parameters:
contentType- The content type string- Returns:
- The parsed content type
-
getMimeType
public java.lang.String getMimeType()
- Returns:
- The mime type of the content type
-
getCharset
public java.util.Optional<java.nio.charset.Charset> getCharset()
- Returns:
- The charset of the content type
-
getBoundary
public java.util.Optional<java.lang.String> getBoundary()
- Returns:
- The boundary of the content type
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-