code: @Override
      public <T> T readDataAsObject() throws IOException {
          Data data = readData();
          return data == null ? null : (T) serializationService.toObject(data);
      }
docs: a future optimization would be to skip the construction of the Data object.