public static int write(List<String> stringList, DataOutputStream stream) throws IOException {
    if (stringList == null) {
      throw new IllegalArgumentException("stringList must not be null!");
    }
    int res = 0;
    int size = stringList.size();
    res += write(size, stream);
    for (String s : stringList) {
      res += write(s, stream);
    }
    return res;
  }
write string list to dataOutputStream.

@return the length of string represented by byte[].
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/utils/BasicStructureSerDeUtil.java