@@ -0,0 +1,450 @@
+package javat.nio;%0A%0Aimport java.nio.ByteBuffer;%0A%0Aimport org.junit.Test;%0A%0Aimport com.google.common.base.Charsets;%0A%0Apublic class ByteBufferTest %7B%0A    @Test%0A    public void testByteToString() throws Exception %7B%0A%09int capacity = 1;%0A%09byte b = 97;%0A%09%0A%09ByteBuffer bb = ByteBuffer.allocate(capacity);%0A%09bb.put(b);%0A%09bb.flip();%0A%09System.out.println(String.valueOf(Charsets.UTF_8.decode(bb)));%0A%09%0A%09Byte.toString(b);%0A%09%0A%09System.out.println(%22a%22.getBytes()%5B0%5D);%0A    %7D%0A%7D%0A

add test