code: public final void writeTo(DataOutput dout) throws IOException {
          dout.writeShort(mNameConstant.getIndex());
          dout.writeInt(getLength());
          writeDataTo(dout);
      }
docs: This method writes the 16 bit name constant index followed by the
  32 bit attribute length, followed by the attribute specific data.