public LazyObject<? extends ObjectInspector> toLazyObject(int fieldID, byte[] bytes) {
    ObjectInspector fieldOI = oi.getAllStructFieldRefs().get(fieldID).getFieldObjectInspector();

    LazyObject<? extends ObjectInspector> lazyObject = LazyFactory
        .createLazyObject(fieldOI);

    ByteArrayRef ref = new ByteArrayRef();

    ref.setData(bytes);

    // initialize the lazy object
    lazyObject.init(ref, 0, ref.getData().length);

    return lazyObject;
  }
Create an initialize a {@link LazyObject} with the given bytes for the given fieldID.

@param fieldID
         field for which the object is to be created
@param bytes
         value with which the object is to be initialized with
@return initialized {@link LazyObject}
hbase-handler/src/java/org/apache/hadoop/hive/hbase/HBaseCompositeKey.java