Package org.glassfish.grizzly.http.util
Class ContentType.SettableContentType
- java.lang.Object
-
- org.glassfish.grizzly.http.util.ContentType
-
- org.glassfish.grizzly.http.util.ContentType.SettableContentType
-
- Enclosing class:
- ContentType
public static final class ContentType.SettableContentType extends ContentType
MutableContentTypeobject.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.glassfish.grizzly.http.util.ContentType
ContentType.SettableContentType
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidreset()Resets the ContentType state.voidset(String type)Sets the content type.voidset(ContentType contentType)Sets the content type.voidsetCharacterEncoding(String charset)Sets the the character encoding (the content-type's charset attribute value).voidsetMimeType(String mimeType)Sets the mime-type part of the content-type (the part without charset attribute).-
Methods inherited from class org.glassfish.grizzly.http.util.ContentType
compose, get, getArrayLen, getByteArray, getCharacterEncoding, getCharsetFromContentType, getMimeType, isMimeTypeSet, isSet, newContentType, newContentType, newSettableContentType, prepare, removeCharset, serializeToDataChunk, toString
-
-
-
-
Method Detail
-
reset
public void reset()
Description copied from class:ContentTypeResets the ContentType state.- Overrides:
resetin classContentType
-
set
public void set(ContentType contentType)
Description copied from class:ContentTypeSets the content type. This method must preserve any charset that may already have been set via a call to request/response.setContentType(), request/response.setLocale(), or request/response.setCharacterEncoding(). This method copies the passed contentType state into this ContentType.- Overrides:
setin classContentType- Parameters:
contentType- the content type
-
set
public void set(String type)
Description copied from class:ContentTypeSets the content type. This method must preserve any charset that may already have been set via a call to request/response.setContentType(), request/response.setLocale(), or request/response.setCharacterEncoding().- Overrides:
setin classContentType- Parameters:
type- the content type
-
setCharacterEncoding
public void setCharacterEncoding(String charset)
Description copied from class:ContentTypeSets the the character encoding (the content-type's charset attribute value).- Overrides:
setCharacterEncodingin classContentType- Parameters:
charset- the character encoding (the content-type's charset attribute value)
-
setMimeType
public void setMimeType(String mimeType)
Description copied from class:ContentTypeSets the mime-type part of the content-type (the part without charset attribute).- Overrides:
setMimeTypein classContentType- Parameters:
mimeType- the mime-type part of the content-type (the part without charset attribute)
-
-