Class PlainEncoder


  • public class PlainEncoder
    extends Encoder
    • Constructor Summary

      Constructors 
      Constructor Description
      PlainEncoder​(TSDataType dataType, int maxStringLength)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void encode​(boolean value, java.io.ByteArrayOutputStream out)  
      void encode​(double value, java.io.ByteArrayOutputStream out)  
      void encode​(float value, java.io.ByteArrayOutputStream out)  
      void encode​(int value, java.io.ByteArrayOutputStream out)  
      void encode​(long value, java.io.ByteArrayOutputStream out)  
      void encode​(short value, java.io.ByteArrayOutputStream out)  
      void encode​(java.math.BigDecimal value, java.io.ByteArrayOutputStream out)  
      void encode​(Binary value, java.io.ByteArrayOutputStream out)  
      void flush​(java.io.ByteArrayOutputStream out)
      Write all values buffered in memory cache to OutputStream.
      long getMaxByteSize()
      The maximal possible memory size occupied by current Encoder.
      int getOneItemMaxSize()
      When encoder accepts a new incoming data point, the maximal possible size in byte it takes to store in memory.
      • Methods inherited from class java.lang.Object

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

      • PlainEncoder

        public PlainEncoder​(TSDataType dataType,
                            int maxStringLength)
    • Method Detail

      • encode

        public void encode​(boolean value,
                           java.io.ByteArrayOutputStream out)
        Overrides:
        encode in class Encoder
      • encode

        public void encode​(short value,
                           java.io.ByteArrayOutputStream out)
        Overrides:
        encode in class Encoder
      • encode

        public void encode​(int value,
                           java.io.ByteArrayOutputStream out)
        Overrides:
        encode in class Encoder
      • encode

        public void encode​(long value,
                           java.io.ByteArrayOutputStream out)
        Overrides:
        encode in class Encoder
      • encode

        public void encode​(float value,
                           java.io.ByteArrayOutputStream out)
        Overrides:
        encode in class Encoder
      • encode

        public void encode​(double value,
                           java.io.ByteArrayOutputStream out)
        Overrides:
        encode in class Encoder
      • encode

        public void encode​(Binary value,
                           java.io.ByteArrayOutputStream out)
        Overrides:
        encode in class Encoder
      • encode

        public void encode​(java.math.BigDecimal value,
                           java.io.ByteArrayOutputStream out)
        Overrides:
        encode in class Encoder
      • flush

        public void flush​(java.io.ByteArrayOutputStream out)
        Description copied from class: Encoder
        Write all values buffered in memory cache to OutputStream.
        Specified by:
        flush in class Encoder
        Parameters:
        out - - ByteArrayOutputStream
      • getOneItemMaxSize

        public int getOneItemMaxSize()
        Description copied from class: Encoder
        When encoder accepts a new incoming data point, the maximal possible size in byte it takes to store in memory.
        Overrides:
        getOneItemMaxSize in class Encoder
        Returns:
        the maximal possible size of one data item encoded by this encoder
      • getMaxByteSize

        public long getMaxByteSize()
        Description copied from class: Encoder
        The maximal possible memory size occupied by current Encoder. This statistic value doesn't involve OutputStream.
        Overrides:
        getMaxByteSize in class Encoder
        Returns:
        the maximal size of possible memory occupied by current encoder