protected static void writeSizeAtOffset(
      RandomAccessOutput byteStream, int byteSizeStart, int size) {
    byteStream.writeInt(byteSizeStart, size);
  }
A recursive function that serialize an object to a byte buffer based on its
object inspector.

@param byteStream
         the byte stream storing the serialization data
@param obj
         the object to serialize
@param objInspector
         the object inspector
@param skipLengthPrefix a boolean indicating whether length prefix is
         needed for list/map/struct
@param warnedOnceNullMapKey a boolean indicating whether a warning
         has been issued once already when encountering null map keys
serde/src/java/org/apache/hadoop/hive/serde2/lazybinary/LazyBinarySerDe.java