leutu
2024-06-03 3ef35e6cd16bbfa206b26bb3271eac40ad020bcb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package com.fastbee.common.utils.gateway.protocol;
 
import io.netty.buffer.ByteBuf;
import io.netty.buffer.ByteBufUtil;
 
/**
 * @author gsb
 * @date 2022/9/15 14:44
 */
public class NettyUtils {
 
    /**
     * ByteBuf转 byte[]
     * @param buf buffer
     * @return byte[]
     */
    public static byte[] readBytesFromByteBuf(ByteBuf buf){
        return ByteBufUtil.getBytes(buf);
    }
 
 
}