Interface FixedData

  • All Known Implementing Classes:
    FixedDataImpl

    public interface FixedData
    Fixed Data Mapper
    Since:
    3.1.0
    Author:
    PARK Yong Seo
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.util.Map<java.lang.Class<?>,​FixedData> STORE  
    • Method Summary

      Modifier and Type Method Description
      default byte[] bindBytes​(java.lang.Object data, byte[] out)
      the class to bind(write) the bytes
      byte[] bindBytes​(java.lang.Object data, byte[] out, int offset)
      the class to bind(write) the bytes
      default java.io.OutputStream bindBytes​(java.lang.Object data, java.io.OutputStream out)
      the class to bind(write) the outputstream
      is not close
      static FixedData getInstance​(java.lang.Class<?> clazz)
      get instance
      int size()
      get byte size of the "FixedData" class
      default byte[] toBytes​(java.lang.Object data)
      class to bytes
      default <T> T toClass​(byte[] bytes)
      bytes to class
      <T> T toClass​(byte[] bytes, int offset)
      bytes to class
    • Field Detail

      • STORE

        static final java.util.Map<java.lang.Class<?>,​FixedData> STORE
    • Method Detail

      • getInstance

        static FixedData getInstance​(java.lang.Class<?> clazz)
        get instance
        Parameters:
        clazz -
        Returns:
      • size

        int size()
        get byte size of the "FixedData" class
        Returns:
      • toClass

        <T> T toClass​(byte[] bytes,
                      int offset)
        bytes to class
        Parameters:
        bytes -
        offset -
        Returns:
      • bindBytes

        byte[] bindBytes​(java.lang.Object data,
                         byte[] out,
                         int offset)
        the class to bind(write) the bytes
        Parameters:
        data -
        out -
        offset -
        Returns:
      • toClass

        default <T> T toClass​(byte[] bytes)
        bytes to class
        Parameters:
        bytes -
        Returns:
      • toBytes

        default byte[] toBytes​(java.lang.Object data)
        class to bytes
        Parameters:
        data -
        Returns:
      • bindBytes

        default byte[] bindBytes​(java.lang.Object data,
                                 byte[] out)
        the class to bind(write) the bytes
        Parameters:
        data -
        out -
        Returns:
      • bindBytes

        default java.io.OutputStream bindBytes​(java.lang.Object data,
                                               java.io.OutputStream out)
                                        throws java.io.IOException
        the class to bind(write) the outputstream
        is not close
        Parameters:
        data -
        out -
        Returns:
        Throws:
        java.io.IOException