@Override
    public void toData(DataOutput out) throws IOException {
      DataSerializer.writeByte(byteField, out);
      DataSerializer.writeShort(shortField, out);
      DataSerializer.writeInteger(intField, out);
      DataSerializer.writeLong(longField, out);
      DataSerializer.writeFloat(floatField, out);
      DataSerializer.writeDouble(doubleField, out);
      DataSerializer.writeCharacter(charField, out);
      DataSerializer.writeBoolean(booleanField, out);

      DataSerializer.writePrimitiveByte(byteFieldPrim, out);
      DataSerializer.writePrimitiveShort(shortFieldPrim, out);
      DataSerializer.writePrimitiveInt(intFieldPrim, out);
      DataSerializer.writePrimitiveLong(longFieldPrim, out);
      DataSerializer.writePrimitiveFloat(floatFieldPrim, out);
      DataSerializer.writePrimitiveDouble(doubleFieldPrim, out);
      DataSerializer.writePrimitiveChar(charFieldPrim, out);
      DataSerializer.writePrimitiveBoolean(booleanFieldPrim, out);

      DataSerializer.writeUnsignedByte(unsignedByteField, out);
      DataSerializer.writeUnsignedShort(unsignedShortField, out);

      DataSerializer.writeString(stringField, out);
      DataSerializer.writeObject(objectField, out);
    }
Creates a new <code>DataSerializableImpl</code> whose contents is empty.
geode-core/src/test/java/org/apache/geode/internal/DataSerializableJUnitTest.java