Class SerializationUtils


  • public class SerializationUtils
    extends java.lang.Object
    Utilities for serializing data.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static char readCharUTF​(java.io.DataInput in)  
      static long readSparseBits​(java.io.DataInput in)
      Read a sparse compressed bitset from in.
      static java.lang.String readString​(java.io.DataInput in)  
      static int readVInt​(java.io.DataInput in)
      VInt compression similar to lucene, except the 1 bits are all put in the beginning.
      static int readZInt​(java.io.DataInput in)  
      static void writeCharUTF​(java.io.DataOutput out, char c)  
      static void writeSparseBits​(java.io.DataOutput out, long v)
      Write a sparse bitset to out for bits in value.
      static void writeString​(java.io.DataOutput out, java.lang.String value)  
      static void writeVInt​(java.io.DataOutput out, int value)
      VInt compression similar to lucene, except the 1 bits are all put in the beginning.
      static void writeZInt​(java.io.DataOutput out, int value)  
      • Methods inherited from class java.lang.Object

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

      • SerializationUtils

        public SerializationUtils()
    • Method Detail

      • readSparseBits

        public static long readSparseBits​(java.io.DataInput in)
                                   throws java.io.IOException
        Read a sparse compressed bitset from in.
        Throws:
        java.io.IOException
      • writeSparseBits

        public static void writeSparseBits​(java.io.DataOutput out,
                                           long v)
                                    throws java.io.IOException
        Write a sparse bitset to out for bits in value.
        Throws:
        java.io.IOException
      • readString

        public static java.lang.String readString​(java.io.DataInput in)
                                           throws java.io.IOException
        Throws:
        java.io.IOException
      • writeString

        public static void writeString​(java.io.DataOutput out,
                                       java.lang.String value)
                                throws java.io.IOException
        Throws:
        java.io.IOException
      • readCharUTF

        public static char readCharUTF​(java.io.DataInput in)
                                throws java.io.IOException
        Throws:
        java.io.IOException
      • writeCharUTF

        public static void writeCharUTF​(java.io.DataOutput out,
                                        char c)
                                 throws java.io.IOException
        Throws:
        java.io.IOException
      • readZInt

        public static int readZInt​(java.io.DataInput in)
                            throws java.io.IOException
        Throws:
        java.io.IOException
      • writeZInt

        public static void writeZInt​(java.io.DataOutput out,
                                     int value)
                              throws java.io.IOException
        Throws:
        java.io.IOException
      • writeVInt

        public static void writeVInt​(java.io.DataOutput out,
                                     int value)
                              throws java.io.IOException
        VInt compression similar to lucene, except the 1 bits are all put in the beginning.
        Throws:
        java.io.IOException
      • readVInt

        public static int readVInt​(java.io.DataInput in)
                            throws java.io.IOException
        VInt compression similar to lucene, except the 1 bits are all put in the beginning.
        Throws:
        java.io.IOException