Debug the issue

fixed issue: encode from buffer was not output. byte[] convert to bytebuffer: wrap and put functions