offset를 계산해서 하나의 byte[]만 생성해서 사용하기 ByteArrayOffsetLengthTest.java import java.nio.ByteBuffer; import java.nio.charset.Charset; public class ByteArrayOffsetLengthTest { private final static int ACK_SIZE = 32; private final static int CLIENT_SIZE = 22; private final static int TIME_SIZE = 8; // private final static int ACK_OFFSET = 0; private final static int CLIENT_OFFSET = ACK_SIZE; private final static int TIME_OFFSET = ACK_SIZE + CLIENT_SIZE; // private final static int TOTAL_SIZE = ACK_SIZE +...
원문 링크 : java(자바) byte array offset 활용