/* (non-Javadoc)
  * @see cn.com.rebirth.commons.io.stream.Streamable#writeTo(cn.com.rebirth.commons.io.stream.StreamOutput)
  */
 @Override
 public void writeTo(StreamOutput out) throws IOException {
   out.writeVInt(1);
   out.writeUTF(uid.field());
   out.writeUTF(uid.text());
   out.writeLong(version);
 }
 /* (non-Javadoc)
  * @see cn.com.rebirth.commons.io.stream.Streamable#writeTo(cn.com.rebirth.commons.io.stream.StreamOutput)
  */
 @Override
 public void writeTo(StreamOutput out) throws IOException {
   out.writeVInt(5);
   out.writeUTF(id);
   out.writeUTF(type);
   out.writeBytesHolder(source);
   if (routing == null) {
     out.writeBoolean(false);
   } else {
     out.writeBoolean(true);
     out.writeUTF(routing);
   }
   if (parent == null) {
     out.writeBoolean(false);
   } else {
     out.writeBoolean(true);
     out.writeUTF(parent);
   }
   out.writeLong(version);
   out.writeLong(timestamp);
   out.writeLong(ttl);
 }