import java.nio.*; import java.nio.ByteBuffer; public class GetIntBuffer { public static final int capacity = 100; public static void main(String[] argv) throws Exception { ByteBuffer bytebuf = ByteBuffer.allocate(capacity); bytebuf.putInt(221255); bytebuf.flip(); System.out.println("Integer data into byte buffer : " + bytebuf.getInt()); } }