code: @InterfaceAudience.Public
      public long getLength() {
          Number length = (Number) metadata.get("length");
          if (length != null) {
              return length.longValue();
          } else {
              return 0;
          }
      }
docs: Get the length in bytes of the contents.