public void writeTo(ByteBuf buf) {
    Objects.requireNonNull(buf, "buf should not be null");

    Utils.serializeString(buf, fileName, Charset.defaultCharset());
    buf.writeLong(fileSize);
  }
Writes the FileInfo object to the given output stream.
@param buf The output stream to write to.
ambry-api/src/main/java/com/github/ambry/store/StoreFileInfo.java