hxb
2022-02-17 af2cbc2a24b3724e7fc3e6b42e134b21a3144c75
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package com.hdl.sdk.socket.codec;
 
 
/**
 * Created by Tong on 2021/9/22.
 */
public abstract class MessageToByteEncoder implements IHandleFlow {
 
 
    protected abstract byte[] encode(byte[] data)
            throws Exception;
 
    @Override
    public final Object read(Object data) {
        return data;
    }
 
    @Override
    public byte[] write(byte[] data) throws Exception {
        return encode(data);
    }
 
 
}