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 TypeMethodDescriptionvoid
reset()
Resets the ContentType state.void
Sets the content type.void
set
(ContentType contentType) Sets the content type.void
setCharacterEncoding
(String charset) Sets the the character encoding (the content-type's charset attribute value).void
setMimeType
(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:ContentType
Resets the ContentType state.- Overrides:
reset
in classContentType
-
set
Description copied from class:ContentType
Sets 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:
set
in classContentType
- Parameters:
contentType
- the content type
-
set
Description copied from class:ContentType
Sets 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:
set
in classContentType
- Parameters:
type
- the content type
-
setCharacterEncoding
Description copied from class:ContentType
Sets the the character encoding (the content-type's charset attribute value).- Overrides:
setCharacterEncoding
in classContentType
- Parameters:
charset
- the character encoding (the content-type's charset attribute value)
-
setMimeType
Description copied from class:ContentType
Sets the mime-type part of the content-type (the part without charset attribute).- Overrides:
setMimeType
in classContentType
- Parameters:
mimeType
- the mime-type part of the content-type (the part without charset attribute)
-