Advertisement
sergAccount

Untitled

Aug 8th, 2020
930
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.63 KB | None | 0 0
  1. /*
  2.  * To change this license header, choose License Headers in Project Properties.
  3.  * To change this template file, choose Tools | Templates
  4.  * and open the template in the editor.
  5.  */
  6. package com.spec.serializers;
  7.  
  8. import com.spec.model.Customer;
  9. import java.nio.charset.StandardCharsets;
  10. import org.apache.kafka.common.serialization.Serializer;
  11.  
  12. /**
  13.  *
  14.  * @author Administrator
  15.  */
  16. public class CustomerSerializer implements Serializer<Customer>{
  17.  
  18.     @Override
  19.     public byte[] serialize(String string, Customer t) {
  20.         String s = t.toString();
  21.         return s.getBytes(StandardCharsets.UTF_8);
  22.     }    
  23. }
  24.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement