public long lengthFor(String string) {
    return lengthForStringOfLength(string.length());
  }
Estimation of memory footprint of object
storage-api/src/java/org/apache/hadoop/hive/ql/util/JavaDataModel.java