ByteBuffer and CharBuffer examples