@Override
    public void fromData(DataInput in) throws IOException, ClassNotFoundException {

      byteField = DataSerializer.readByte(in);
      shortField = DataSerializer.readShort(in);
      intField = DataSerializer.readInteger(in);
      longField = DataSerializer.readLong(in);
      floatField = DataSerializer.readFloat(in);
      doubleField = DataSerializer.readDouble(in);
      charField = DataSerializer.readCharacter(in);
      booleanField = DataSerializer.readBoolean(in);

      byteFieldPrim = DataSerializer.readPrimitiveByte(in);
      shortFieldPrim = DataSerializer.readPrimitiveShort(in);
      intFieldPrim = DataSerializer.readPrimitiveInt(in);
      longFieldPrim = DataSerializer.readPrimitiveLong(in);
      floatFieldPrim = DataSerializer.readPrimitiveFloat(in);
      doubleFieldPrim = DataSerializer.readPrimitiveDouble(in);
      charFieldPrim = DataSerializer.readPrimitiveChar(in);
      booleanFieldPrim = DataSerializer.readPrimitiveBoolean(in);

      unsignedByteField = DataSerializer.readUnsignedByte(in);
      unsignedShortField = DataSerializer.readUnsignedShort(in);

      stringField = DataSerializer.readString(in);
      objectField = DataSerializer.readObject(in);
    }
Creates a new <code>DataSerializableImpl</code> whose contents is empty.
geode-core/src/test/java/org/apache/geode/internal/DataSerializableJUnitTest.java