public static ChecksumProto toProto(DataChecksum checksum) { ChecksumTypeProto type = PBHelper.convert(checksum.getChecksumType()); // ChecksumType#valueOf never returns null return ChecksumProto.newBuilder() .setBytesPerChecksum(checksum.getBytesPerChecksum()) .setType(type) .build(); }
public static ChecksumProto toProto(DataChecksum checksum) { ChecksumTypeProto type = PBHelperClient.convert(checksum.getChecksumType()); // ChecksumType#valueOf never returns null return ChecksumProto.newBuilder() .setBytesPerChecksum(checksum.getBytesPerChecksum()) .setType(type) .build(); }
public static ChecksumProto toProto(DataChecksum checksum) { ChecksumTypeProto type = PBHelper.convert(checksum.getChecksumType()); // ChecksumType#valueOf never returns null return ChecksumProto.newBuilder() .setBytesPerChecksum(checksum.getBytesPerChecksum()).setType(type) .build(); }