com.supermap.services.rest.encoders
Class ObjectStreamEncoder
- java.lang.Object
-
- com.supermap.services.rest.encoders.Encoder
-
- com.supermap.services.rest.encoders.ObjectStreamEncoder
-
public class ObjectStreamEncoder extends Encoder
Java object binary stream serializer.
Is responsible for serializing a Java object into a binary stream in Java.
-
-
Constructor Summary
Constructors Constructor and Description ObjectStreamEncoder()
-
Method Summary
Methods Modifier and Type Method and Description protected java.util.List<MediaType>createSupportedMediaTypes()Creates a supported media type, here is the# APPLICATION_JAVA_OBJECTtype.RepresentationtoRepresentation(MediaType mediaType, java.lang.Object obj)Serializes a Java object into a binary stream representation in Java-
Methods inherited from class com.supermap.services.rest.encoders.Encoder
getSupportedMediaTypes, isEncodeAllow
-
-
-
-
Method Detail
-
createSupportedMediaTypes
protected java.util.List<MediaType> createSupportedMediaTypes()
Creates a supported media type, here is the
# APPLICATION_JAVA_OBJECTtype.- Specified by:
createSupportedMediaTypesin classEncoder- Returns:
- media type list.
-
toRepresentation
public Representation toRepresentation(MediaType mediaType, java.lang.Object obj)Serializes a Java object into a binary stream representation in Java
- Specified by:
toRepresentationin classEncoder- Parameters:
mediaType- The type of expression.obj- The Java object to be converted.- Returns:
- Specifies the binary flow representation of the object.
-
-