Module org.glassfish.grizzly.http
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
Mutable
ContentType object.-
Nested Class Summary
Nested classes/interfaces inherited from class org.glassfish.grizzly.http.util.ContentType
ContentType.SettableContentType -
Method Summary
Modifier and TypeMethodDescriptionvoidreset()Resets the ContentType state.voidSets 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 Details
-
reset
public void reset()Description copied from class:ContentTypeResets the ContentType state.- Overrides:
resetin classContentType
-
set
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
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
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
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)
-