com.supermap.services.rest.encoders

Class ObjectStreamEncoder



  • public class ObjectStreamEncoder
    extends Encoder
    

    Java object binary stream serializer.

    Is responsible for serializing a Java object into a binary stream in Java.

    • 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_OBJECT type.
      Representation toRepresentation(MediaType mediaType, java.lang.Object obj)
      Serializes a Java object into a binary stream representation in Java
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ObjectStreamEncoder

        public ObjectStreamEncoder()
        
    • Method Detail

      • createSupportedMediaTypes

        protected java.util.List<MediaType> createSupportedMediaTypes()
        

        Creates a supported media type, here is the # APPLICATION_JAVA_OBJECT type.

        Specified by:
        createSupportedMediaTypes in class Encoder
        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:
        toRepresentation in class Encoder
        Parameters:
        mediaType - The type of expression.
        obj - The Java object to be converted.
        Returns:
        Specifies the binary flow representation of the object.