메이븐 pom.xml 에 아래 dependecy 추가

<dependency>
    <groupId>io.netty</groupId>
    <artifactId>netty-all</artifactId>
    <version>4.1.77.Final</version>
</dependency>
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
public static ByteBuf strToBytoBuf(String strData)
{
    return Unpooled.wrappedBuffer(strData.getBytes(StandardCharsets.UTF_8));
}
public static String ByteBufToStr(ByteBuf byteBuf)
{
    return byteBuf.toString(CharsetUtil.UTF_8);
}

 

https://link.coupang.com/a/Ne41R

 

인테리어 오브제

COUPANG

www.coupang.com

이 포스팅은 쿠팡 파트너스 활동의 일환으로, 이에 따른 일정액의 수수료를 제공받습니다.

AND