{"id":2714,"date":"2018-04-24T21:46:02","date_gmt":"2018-04-24T13:46:02","guid":{"rendered":"http:\/\/www.xttblog.com\/?p=2714"},"modified":"2018-04-24T21:46:02","modified_gmt":"2018-04-24T13:46:02","slug":"bytebuffer-%e7%9b%b4%e6%8e%a5%e7%bc%93%e5%86%b2%e5%8c%ba%e5%92%8c%e9%9d%9e%e7%9b%b4%e6%8e%a5%e7%bc%93%e5%86%b2%e5%8c%ba","status":"publish","type":"post","link":"https:\/\/www.xttblog.com\/?p=2714","title":{"rendered":"ByteBuffer \u76f4\u63a5\u7f13\u51b2\u533a\u548c\u975e\u76f4\u63a5\u7f13\u51b2\u533a"},"content":{"rendered":"<p>\n\tByteBuffer \u5728\u5e73\u65f6\u5de5\u4f5c\u4e2d\u53ef\u80fd\u7528\u5230\u7684\u4e0d\u591a\uff0c\u4f46\u662f\u9762\u8bd5\u4e2d\u7ecf\u5e38\u4f1a\u88ab\u95ee\u5230\u3002\u672c\u6587\u603b\u7ed3\u4e86\u4e00\u4e9b\u5173\u4e8e ByteBuffer \u7684\u7528\u6cd5\u548c\u76f8\u5173 API \u4ecb\u7ecd\u3002\n<\/p>\n<p>\n\t\u4e0b\u9762\u662f\u521b\u5efaByteBuffer\u5bf9\u8c61\u7684\u51e0\u79cd\u65b9\u5f0f\uff1a\n<\/p>\n<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"180\">\n<p>\n\t\t\t\t\t<code>static<\/code>&nbsp;<strong>ByteBuffer<\/strong>\n\t\t\t\t<\/p>\n<\/td>\n<td valign=\"top\" width=\"645\">\n<p>\n\t\t\t\t\t<strong>allocate<\/strong><code>(int<\/code><code>&nbsp;<\/code><code>capacity)<\/code>\n\t\t\t\t<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"180\">\n<p>\n\t\t\t\t\t<code>static<\/code>&nbsp;<strong>ByteBuffer<\/strong>\n\t\t\t\t<\/p>\n<\/td>\n<td valign=\"top\" width=\"645\">\n<p>\n\t\t\t\t\t<strong>allocateDirect<\/strong><code>(int<\/code><code>&nbsp;<\/code><code>capacity)<\/code>\n\t\t\t\t<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"180\">\n<p>\n\t\t\t\t\t<code>static<\/code>&nbsp;<strong>ByteBuffer<\/strong>\n\t\t\t\t<\/p>\n<\/td>\n<td valign=\"top\" width=\"645\">\n<p>\n\t\t\t\t\t<strong>wrap<\/strong><code>(byte[]<\/code><code>&nbsp;<\/code><code>array)<\/code>\n\t\t\t\t<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"180\">\n<p>\n\t\t\t\t\t<code>static<\/code>&nbsp;<strong>ByteBuffer<\/strong>\n\t\t\t\t<\/p>\n<\/td>\n<td valign=\"top\" width=\"645\">\n<p>\n\t\t\t\t\t<strong>wrap<\/strong><code>(byte[]<\/code><code>&nbsp;<\/code><code>array, int<\/code><code>&nbsp;<\/code><code>offset, int<\/code><code>&nbsp;<\/code><code>length)<\/code>\n\t\t\t\t<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\n\tallocate\u65b9\u5f0f\u521b\u5efa\u7684ByteBuffer\u5bf9\u8c61\u6211\u4eec\u79f0\u4e4b\u4e3a\u975e\u76f4\u63a5\u7f13\u51b2\u533a\uff0c\u8fd9\u4e2aByteBuffer\u5bf9\u8c61(\u548c\u5bf9\u8c61\u5305\u542b\u7684\u7f13\u51b2\u6570\u7ec4)\u90fd\u4f4d\u4e8eJVM\u7684\u5806\u533a\u3002wrap\u65b9\u5f0f\u548callocate\u65b9\u5f0f\u521b\u5efa\u7684ByteBuffer\u6ca1\u6709\u672c\u8d28\u533a\u522b\uff0c\u90fd\u521b\u5efa\u7684\u662f\u975e\u76f4\u63a5\u7f13\u51b2\u533a\u3002\n<\/p>\n<p>\n\tallocateDirect\u65b9\u6cd5\u521b\u5efa\u7684ByteBuffer\u6211\u4eec\u79f0\u4e4b\u4e3a\u76f4\u63a5\u7f13\u51b2\u533a\uff0c\u6b64\u65f6ByteBuffer\u5bf9\u8c61\u672c\u8eab\u5728\u5806\u533a\uff0c\u800c\u7f13\u51b2\u6570\u7ec4\u4f4d\u4e8e\u975e\u5806\u533a\uff0c ByteBuffer\u5bf9\u8c61\u5185\u90e8\u5b58\u50a8\u4e86\u8fd9\u4e2a\u975e\u5806\u7f13\u51b2\u6570\u7ec4\u7684\u5730\u5740\u3002\u5728\u975e\u5806\u533a\u7684\u7f13\u51b2\u6570\u7ec4\u53ef\u4ee5\u901a\u8fc7JNI\uff08\u5185\u90e8\u8fd8\u662f\u7cfb\u7edf\u8c03\u7528\uff09\u65b9\u5f0f\u8fdb\u884cIO\u64cd\u4f5c\uff0cJNI\u4e0d\u53d7gc\u5f71\u54cd\uff0c\u673a\u5668\u7801\u6267\u884c\u901f\u5ea6\u4e5f\u6bd4\u8f83\u5feb\uff0c\u540c\u65f6\u8fd8\u907f\u514d\u4e86JVM\u5806\u533a\u4e0e\u64cd\u4f5c\u7cfb\u7edf\u5185\u6838\u7f13\u51b2\u533a\u7684\u6570\u636e\u62f7\u8d1d\uff0c\u6240\u4ee5IO\u901f\u5ea6\u6bd4\u975e\u76f4\u63a5\u7f13\u51b2\u533a\u5feb\u3002\u7136\u800callocateDirect\u65b9\u5f0f\u521b\u5efaByteBuffer\u5bf9\u8c61\u82b1\u8d39\u7684\u65f6\u95f4\u548c\u56de\u6536\u8be5\u5bf9\u8c61\u82b1\u8d39\u7684\u65f6\u95f4\u6bd4\u8f83\u591a\uff0c\u6240\u4ee5\u8fd9\u4e2a\u65b9\u6cd5\u9002\u7528\u4e8e\u521b\u5efa\u90a3\u4e9b\u9700\u8981\u91cd\u590d\u4f7f\u7528\u7684\u7f13\u51b2\u533a\u5bf9\u8c61\u3002\n<\/p>\n<h2>\n\tByteBuffer \u5c5e\u6027\u548c\u65b9\u6cd5<br \/>\n<\/h2>\n<p>\n\tByteBuffer\u5bf9\u8c61\u4e09\u4e2a\u91cd\u8981\u5c5e\u6027 position, limit\u548ccapacity\u3002\u5176\u4e2dcapacity\u8868\u793a\u4e86\u7f13\u51b2\u533a\u7684\u603b\u5bb9\u91cf\uff0c\u59cb\u7ec8\u4fdd\u6301\u4e0d\u53d8\uff0c\u521d\u59cb\u65f6\u5019position \u7b49\u4e8e 0 , limit \u7b49\u4e8e capacity\u3002\n<\/p>\n<p>\n\tput\uff1a\u5411\u7f13\u51b2\u533a\u653e\u5165\u6570\u636e\n<\/p>\n<table border=\"1\" cellpadding=\"0\" cellspacing=\"0\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"196\">\n<p>\n\t\t\t\t\t<code>abstract<\/code>&nbsp;<strong>ByteBuffer<\/strong>\n\t\t\t\t<\/p>\n<\/td>\n<td valign=\"top\" width=\"630\">\n<p>\n\t\t\t\t\t<strong>put<\/strong><code>(byte b)<\/code>\n\t\t\t\t<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"196\">\n<p>\n\t\t\t\t\t<strong>ByteBuffer<\/strong>\n\t\t\t\t<\/p>\n<\/td>\n<td valign=\"top\" width=\"630\">\n<p>\n\t\t\t\t\t<strong>put<\/strong><code>(byte[] src)<\/code>\n\t\t\t\t<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"196\">\n<p>\n\t\t\t\t\t<strong>ByteBuffer<\/strong>\n\t\t\t\t<\/p>\n<\/td>\n<td valign=\"top\" width=\"630\">\n<p>\n\t\t\t\t\t<strong>put<\/strong><code>(byte[] src, int offset, int length)<\/code>\n\t\t\t\t<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\n\t\u8c03\u7528put\u65b9\u6cd5\u524d\uff0climit\u5e94\u8be5\u7b49\u4e8ecapacity\uff0c\u5982\u679c\u4e0d\u7b49\u4e8e\uff0c\u51e0\u4e4e\u53ef\u4ee5\u80af\u5b9a\u6211\u4eec\u5bf9\u7f13\u51b2\u533a\u7684\u64cd\u4f5c\u6709\u8bef\u3002\u5728put\u65b9\u6cd5\u4e2d0\u5230position-1\u7684\u533a\u57df\u8868\u793a\u6709\u6548\u6570\u636e,position\u5230limit\u4e4b\u95f4\u533a\u57df\u8868\u793a\u7a7a\u95f2\u533a\u57df\u3002put\u65b9\u6cd5\u4f1a\u4eceposition\u7684\u5f53\u524d\u4f4d\u7f6e\u653e\u5165\u6570\u636e\uff0c\u6bcf\u653e\u5165\u4e00\u4e2a\u6570\u636eposition\u589e\u52a01\uff0c\u5f53position\u7b49\u4e8elimit\uff08\u5373\u7a7a\u95f2\u533a\u57df\u4f7f\u7528\u5b8c\uff09\u65f6\u8fd8\u7ee7\u7eed\u653e\u5165\u6570\u636e\u5c31\u4f1a\u629b\u51faBufferUnderflowException\u5f02\u5e38\n<\/p>\n<p>\n\tget\uff1a\u4ece\u7f13\u51b2\u533a\u8bfb\u53d6\u6570\u636e\n<\/p>\n<table border=\"1\" cellpadding=\"0\" cellspacing=\"0\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"189\">\n<p>\n\t\t\t\t\t<code>abstract byte<\/code>\n\t\t\t\t<\/p>\n<\/td>\n<td valign=\"top\" width=\"635\">\n<p>\n\t\t\t\t\t<strong>get<\/strong><code>()<\/code>\n\t\t\t\t<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"189\">\n<p>\n\t\t\t\t\t<strong>ByteBuffer<\/strong>\n\t\t\t\t<\/p>\n<\/td>\n<td valign=\"top\" width=\"635\">\n<p>\n\t\t\t\t\t<strong>get<\/strong><code>(byte[] dst)<\/code>\n\t\t\t\t<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"189\">\n<p>\n\t\t\t\t\t<strong>ByteBuffer<\/strong>\n\t\t\t\t<\/p>\n<\/td>\n<td valign=\"top\" width=\"635\">\n<p>\n\t\t\t\t\t<strong>get<\/strong><code>(byte[] dst, int offset, int length)<\/code>\n\t\t\t\t<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\n\t\u5728get\u65b9\u6cd5\u4e2d\uff0c 0\u5230position-1\u7684\u533a\u57df\u8868\u793a\u5df2\u8bfb\u6570\u636e,position\u5230limit\u4e4b\u95f4\u7684\u533a\u57df\u8868\u793a\u672a\u8bfb\u53d6\u7684\u6570\u636e\u3002\u6bcf\u8bfb\u53d6\u4e00\u4e2a\u6570\u636eposition\u589e\u52a01\uff0c\u5f53position\u7b49\u4e8elimit\u65f6\u7ee7\u7eed\u8bfb\u53d6\u6570\u636e\u5c31\u4f1a\u629b\u51faBufferUnderflowException\u5f02\u5e38\u3002\n<\/p>\n<p>\n\tflip \uff1a\u5c06\u5199\u6a21\u5f0f\u8f6c\u6362\u6210\u8bfb\u6a21\u5f0f\n<\/p>\n<pre class=\"brush:java;\">\r\npublic final Buffer flip() {\r\n    limit = position;\r\n    position = 0;\r\n    mark = -1;\r\n    return this;\r\n}<\/pre>\n<p>\n\tclear\uff1a\u6e05\u7a7a\u7f13\u51b2\u533a\uff0c\u5c06\u8bfb\u6a21\u5f0f\u8f6c\u6362\u5199\u6a21\u5f0f\n<\/p>\n<pre class=\"brush:java;\">\r\npublic final Buffer clear() {\r\n    position = 0;\r\n    limit = capacity;\r\n    mark = -1;\r\n    return this;\r\n}<\/pre>\n<p>\n\tcompact\uff1a\u4fdd\u7559\u672a\u8bfb\u53d6\u7684\u6570\u636e\uff0c\u5c06\u8bfb\u6a21\u5f0f\u8f6c\u6362\u5199\u6a21\u5f0f\n<\/p>\n<pre class=\"brush:java;\">\r\npublic ByteBuffer compact() {\r\n    int pos = position();\r\n    int lim = limit();\r\n    assert (pos &lt;= lim);\r\n    int rem = (pos &lt;= lim ? lim - pos : 0);\r\n    unsafe.copyMemory(ix(pos), ix(0), (long)rem &lt;&lt; 0);\r\n    position(rem);\r\n    limit(capacity());\r\n    discardMark();\r\n    return this;\r\n}<\/pre>\n<p>\n\tmark\uff1a\u4fdd\u5b58\u5f53\u524dposition\u7684\u4f4d\u7f6e\u5230mark\u53d8\u91cf\n<\/p>\n<pre class=\"brush:java;\">\r\npublic final Buffer mark() {\r\n    mark = position;\r\n    return this;\r\n}<\/pre>\n<p>\n\trest\uff1a\u5c06position\u7f6e\u4e3amark\u53d8\u91cf\u4e2d\u7684\u503c\n<\/p>\n<pre class=\"brush:java;\">\r\npublic final Buffer reset() {\r\n    int m = mark;\r\n    if (m &lt; 0)\r\n        throw new InvalidMarkException();\r\n    position = m;\r\n    return this;\r\n}<\/pre>\n<p>\n\tmark\u65b9\u6cd5\u548crest\u65b9\u6cd5\u8054\u5408\u4f7f\u7528\u53ef\u5b9e\u73b0\u4ece\u6307\u5b9a\u4f4d\u7f6e\u7684\u91cd\u8bfb\u3002\n<\/p>\n<p>\n\trewind\uff1a\u4ece\u5934\u5f00\u59cb\u91cd\u8bfb\n<\/p>\n<pre class=\"brush:java;\">\r\npublic final Buffer rewind() {\r\n    position = 0;\r\n    mark = -1;\r\n    return this;\r\n}<\/pre>\n<p>\n\tByteBuffer\u5bf9\u8c61\u4f7f\u7528\u65f6\u53c8\u5f88\u591a\u9700\u8981\u6ce8\u610f\u7684\u5730\u65b9\uff0c\u81ea\u8ba4\u4e3a\u8fd9\u4e2aAPI\u8bbe\u8ba1\u7684\u4e0d\u662f\u5f88\u53cb\u597d\u3002\u6bd4\u5982\u4e00\u5b9a\u4e0d\u80fd\u8fde\u7eed\u4e24\u6b21\u8c03\u7528flip\u548ccompact\u65b9\u6cd5,flip\u65b9\u6cd5\u8c03\u7528\u4ee5\u540e\u4e0d\u80fd\u518d\u8c03\u7528put\u65b9\u6cd5\uff0c\u7b49\u7b49\u3002\u8981\u907f\u514d\u8fd9\u4e9b\u9519\u8bef\uff0c\u53ea\u80fd\u5728\u4f7f\u7528ByteBuffer\u524d\u5f04\u6e05\u695a\u5f53\u524d\u7f13\u51b2\u533a\u4e2d0\u5230position-1\u4ee5\u53caposition\u5230limit\u4e2d\u6570\u636e\u8868\u793a\u7684\u542b\u4e49\uff0c\u8fd9\u624d\u662f\u907f\u514dbug\u7684\u6839\u672c\u529e\u6cd5\u3002\n<\/p>\n<p>\n\t\u4ece\u4e0a\u9762\u7684\u4ecb\u7ecd\u4e2d\u6211\u4eec\u53ef\u4ee5\u770b\u51fa\uff0cByteBuffer\u5bf9\u8c61\u65e2\u53ef\u4ee5\u8bfb\uff0c\u4e5f\u53ef\u4ee5\u5199\u3002\u9664\u975e\u6211\u4eec\u80fd\u4fdd\u8bc1\u5728\u8bfb\u64cd\u4f5c\u4e00\u6b21\u6027\u4f7f\u7528\u5b8cByteBuffer\u5bf9\u8c61\u4e2d\u7684\u6240\u6709\u6570\u636e\uff0c\u5e76\u4e14\u4fdd\u8bc1\u5199\u5165ByteBuffer\u5bf9\u8c61\u5411\u4e2d\u7684\u5185\u5bb9\u5168\u90e8\u5199\u5165\u5b8c\u6210\uff0c\u5426\u5219\u540c\u65f6\u7528\u4e8e\u8bfb\u5199\u7684ByteBuffer\u5bf9\u8c61\u4f1a\u9020\u6210\u6570\u636e\u7684\u6df7\u4e71\u548c\u9519\u8bef\u3002\u4e00\u822c\u6765\u8bf4\uff0c\u6211\u4eec\u90fd\u4f1a\u521b\u5efa\u4e24\u4e2aByteBuffer\u5bf9\u8c61\u5411\uff0c\u4e00\u4e2a\u7528\u4e8e\u63a5\u6536\u6570\u636e\uff0c\u53e6\u4e00\u4e2a\u7528\u4e8e\u53d1\u9001\u6570\u636e\u3002\n<\/p>\n<p>\n\tByteBuffer\u662f\u9762\u5411\u5b57\u8282\u7684\uff0c\u4e3a\u65b9\u4fbf\u57fa\u672c\u6570\u636e\u7c7b\u578b\u7684\u8bfb\u53d6\uff0cByteBuffer\u4e2d\u8fd8\u63d0\u4f9bgetInt\uff0cputInt\uff0cgetFloat\uff0cputFloat\u7b49\u65b9\u6cd5\uff0c\u8fd9\u4e9b\u65b9\u6cd5\u65b9\u4fbf\u6211\u4eec\u5728\u7f13\u51b2\u533a\u5b58\u53d6\u5355\u4e2a\u57fa\u672c\u6570\u636e\u7c7b\u578b\u3002\u5982\u679c\u9700\u8981\u4ece\u57fa\u672c\u6570\u636e\u7c7b\u578b\u6570\u7ec4\u4e2d\u5199\u5165\u5230ByteBuffer\u4e2d\uff0c\u6216\u8005\u4eceByteBuffer\u4e2d\u8bfb\u53d6\u5230\u57fa\u672c\u6570\u636e\u7c7b\u578b\u7684\u6570\u7ec4\u4e2d\uff0c\u90a3\u4e48\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u5df2\u521b\u5efa\u597d\u7684ByteBuffer\u5bf9\u8c61\u7684asXxxBuffer\u65b9\u6cd5\u521b\u5efa\u57fa\u672c\u6570\u636e\u7c7b\u578b\u7684Buffer\u3002\n<\/p>\n<table border=\"1\" cellpadding=\"0\" cellspacing=\"0\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"196\">\n<p>\n\t\t\t\t\t<code>abstract<\/code>&nbsp;<strong>CharBuffer<\/strong>\n\t\t\t\t<\/p>\n<\/td>\n<td valign=\"top\" width=\"625\">\n<p>\n\t\t\t\t\t<strong>asCharBuffer<\/strong><code>()<\/code>\n\t\t\t\t<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"196\">\n<p>\n\t\t\t\t\t<code>abstract<\/code>&nbsp;<strong>DoubleBuffer<\/strong>\n\t\t\t\t<\/p>\n<\/td>\n<td valign=\"top\" width=\"625\">\n<p>\n\t\t\t\t\t<strong>asDoubleBuffer<\/strong><code>()<\/code>\n\t\t\t\t<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"196\">\n<p>\n\t\t\t\t\t<code>abstract<\/code>&nbsp;<strong>FloatBuffer<\/strong>\n\t\t\t\t<\/p>\n<\/td>\n<td valign=\"top\" width=\"625\">\n<p>\n\t\t\t\t\t<strong>asFloatBuffer<\/strong><code>()<\/code>\n\t\t\t\t<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"196\">\n<p>\n\t\t\t\t\t<code>abstract<\/code>&nbsp;<strong>IntBuffer<\/strong>\n\t\t\t\t<\/p>\n<\/td>\n<td valign=\"top\" width=\"625\">\n<p>\n\t\t\t\t\t<strong>asIntBuffer<\/strong><code>()<\/code>\n\t\t\t\t<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"196\">\n<p>\n\t\t\t\t\t<code>abstract<\/code>&nbsp;<strong>LongBuffer<\/strong>\n\t\t\t\t<\/p>\n<\/td>\n<td valign=\"top\" width=\"625\">\n<p>\n\t\t\t\t\t<strong>asLongBuffer<\/strong><code>()<\/code>\n\t\t\t\t<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\n\t\u5047\u8bbe\u6709\u5982\u4e0b\u4ee3\u7801\n<\/p>\n<pre class=\"brush:java;\">\r\nIntBuffer intBufferObj = byteBufferObj.asIntBuffer();<\/pre>\n<p>\n\t\u6b64\u65f6intBufferObj\u548cbyteBufferObj\u5bf9\u8c61\u5171\u4eab\u5e95\u5c42\u7684\u6570\u7ec4\u3002\u4f46\u662f\u6bd4\u8f83\u5751\u7239\u7684\u662f\u4e24\u4e2abuffer\u7684position\uff0climit\u662f\u72ec\u7acb\u7684\uff0c\u8fd9\u6837\u6781\u6613\u4ea7\u751fbug\uff0c\u9700\u8981\u5f15\u8d77\u6211\u4eec\u6ce8\u610f\u3002<\/p>\n<!-- <audio autoplay=\"autoplay\" height=\"100\" width=\"100\" hidden=\"true\"><source src=\"https:\/\/c.coka.la\/orAvPR.mp3\" type=\"audio\/mp3\"\/><\/audio><img decoding=\"async\" src=\"https:\/\/images.weserv.nl\/?url=https:\/\/ws3.sinaimg.cn\/large\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/> --><p><!-- <img decoding=\"async\" src=\"https:\/\/raw.githubusercontent.com\/xmt1139057136\/xttblog\/master\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/>--><img decoding=\"async\" src=\"https:\/\/saas.51autoparts.cn\/api\/admin\/sys-file\/oss\/file?fileName=84db51f8561e448f9a4fda2eff0811f9.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/><\/p><p>\u6700\u540e\uff0c\u6b22\u8fce\u5173\u6ce8\u6211\u7684\u4e2a\u4eba\u5fae\u4fe1\u516c\u4f17\u53f7\uff1a\u4e1a\u4f59\u8349\uff08yyucao\uff09\uff01<b>\u53ef\u52a0\u4f5c\u8005\u5fae\u4fe1\u53f7\uff1a<font color=\"red\">xttblog2<\/font>\u3002\u5907\u6ce8\uff1a\u201c1\u201d\uff0c\u6dfb\u52a0\u535a\u4e3b\u5fae\u4fe1\u62c9\u4f60\u8fdb\u5fae\u4fe1\u7fa4\u3002\u5907\u6ce8\u9519\u8bef\u4e0d\u4f1a\u540c\u610f\u597d\u53cb\u7533\u8bf7\u3002<\/b>\u518d\u6b21\u611f\u8c22\u60a8\u7684\u5173\u6ce8\uff01\u540e\u7eed\u6709\u7cbe\u5f69\u5185\u5bb9\u4f1a\u7b2c\u4e00\u65f6\u95f4\u53d1\u7ed9\u60a8\uff01\u539f\u521b\u6587\u7ae0\u6295\u7a3f\u8bf7\u53d1\u9001\u81f3532009913@qq.com\u90ae\u7bb1\u3002\u5546\u52a1\u5408\u4f5c\u4e5f\u53ef\u6dfb\u52a0\u4f5c\u8005\u5fae\u4fe1\u8fdb\u884c\u8054\u7cfb\uff01<\/p><p>\u672c\u6587\u539f\u6587\u51fa\u5904\uff1a<a href=\"https:\/\/www.xttblog.com\">\u4e1a\u4f59\u8349<\/a>\uff1a &raquo; <a href=\"https:\/\/www.xttblog.com\/?p=2714\">ByteBuffer \u76f4\u63a5\u7f13\u51b2\u533a\u548c\u975e\u76f4\u63a5\u7f13\u51b2\u533a<\/a><\/p><!-- <div class=\"bd-reward-stl\"><button id=\"bdRewardBtn\"><span><\/span><\/button><\/div> -->","protected":false},"excerpt":{"rendered":"<p>ByteBuffer \u5728\u5e73\u65f6\u5de5\u4f5c\u4e2d\u53ef\u80fd\u7528\u5230\u7684\u4e0d\u591a\uff0c\u4f46\u662f\u9762\u8bd5\u4e2d\u7ecf\u5e38\u4f1a\u88ab\u95ee\u5230\u3002\u672c\u6587\u603b\u7ed3\u4e86\u4e00\u4e9b\u5173\u4e8e ByteBuff [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[1624,69,176,1362,717],"class_list":["post-2714","post","type-post","status-publish","format-standard","hentry","category-java","tag-bytebuffer","tag-java","tag-mina","tag-1362","tag-717"],"_links":{"self":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/2714","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2714"}],"version-history":[{"count":1,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/2714\/revisions"}],"predecessor-version":[{"id":2715,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/2714\/revisions\/2715"}],"wp:attachment":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2714"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2714"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2714"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}