public class TextPlainFactory extends Object implements MediaTypeFactory
MediaTypeFactory
for Media-Type "text/plain" (
MediaType.TEXT_PLAIN
).MediaTypeAccessor.MediaTypeBuilder<B extends MediaTypeAccessor.MediaTypeBuilder<B>>, MediaTypeAccessor.MediaTypeMutator, MediaTypeAccessor.MediaTypeProperty
Constructor and Description |
---|
TextPlainFactory() |
Modifier and Type | Method and Description |
---|---|
MediaType |
getMediaType()
Gets the media type.
|
String |
toMarshaled(Object aObject)
To marshaled.
|
<T> T |
toUnmarshaled(String aHttpBody,
Class<T> aType)
To unmarshaled.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
fromMarshaled, fromMarshaled, fromMarshaled, fromMarshaled, fromUnmarshaled, fromUnmarshaled
public MediaType getMediaType()
getMediaType
in interface MediaTypeAccessor
public String toMarshaled(Object aObject) throws org.refcodes.exception.MarshalException
toMarshaled
in interface org.refcodes.factory.MarshalFactory<String>
aObject
- the a objectorg.refcodes.exception.MarshalException
- the marshal exceptionpublic <T> T toUnmarshaled(String aHttpBody, Class<T> aType) throws org.refcodes.exception.UnmarshalException
toUnmarshaled
in interface org.refcodes.factory.UnmarshalFactory<String>
T
- the generic typeaHttpBody
- the a http bodyaType
- the a typeorg.refcodes.exception.UnmarshalException
- the unmarshal exceptionCopyright © 2017. All rights reserved.