
本文共 5380 字,大约阅读时间需要 17 分钟。
���������������������������������������������������������������������
���������������������������������������JVM������
������������������������������������������������������������������������������������������������������������������������������������
������������������������������������������������������������
���������������������������������������������������������
������������������������������������������������������
���������������������������--������������������������������������������������������������������������������������������������������������������������������������
���������������������������������������������
������������
���������������������������������������������������������������Buffer������������������������������������������������������������������������������API���
���������������������������0<=mark<=position<=limit<=capicity
���������Capicity���������������������������������������������
���������Limit���������������������������
���������Position������������������������������������������������������������
���������Mark���������������������mark()������mark=position���reset()������postion=mark���
���������hello������������
Buffer������������������
������Buffer������������������������������������������������
���������������������������ByteBuffer���
ByteBuffer bf = ByteBuffer.allocate(1024).asReadOnlyBuffer()
Flip()������������������������������������������������������������������������������������������������������������������������
bf.flip() = bf.limit(bf.position()).position(0)
rewind():
bf.rewind() = bf.position(0)
������������������������������
mark()���Buffer������������������������������������������������������������������������������ow������position���6
reset()������positon���mark���������
���������������������������Buffer���������������������������������������������������������������equals=true���
Buffer.get(byte[])���BufferUnderflowException���
������������buffer���������������������buffer���������������������������������������������������������������������������������������buffer������������������������
Buffer.get(byte[], 0, Buffer.remaining());
Buffer.put(byte[])���BufferUnderflowException���
������������������������buffer���buffer������������������������������������������������
Buffer.wrap(byte[], int offset, int length)���offset���length������������������������������������������������������������������������������������������������������������������������������������������slice���������
allocate(), wrap() ������������������������������������������������������������������������������������������
Duplicate()������������������������������������Buffer���������������������������������������������������������������������������������������������
Slice() ������������������������������������������������������������������������������������������������������������limit-position������������������������������������������������������������������������������������������������������������������
������������������������������������������������������������������������������������������������������������������������������������������endian-ness)������������������������������������--big-end���������������������������������������������������������������������������������������������������
IP���������������������������������������������������������
������ByteOrder.nativeOrder() ������LITTLE_ENDIAN������BIG_ENDIAN���������
Java���������������������������������������������������ByteBuffer.order() ������������ByteOrder.BIG_ENDIAN���
������������������������������������IO���������IO������������������������������������������������������JVM���������������������������������������������������GC������������������������������������IO���������������������
���������������������������������������IO������������������������������������������������������������������������
���������������=���������
������������������=������������������������=���IO=���������������������������������
���������������������������������������������������������������
���������������������������������������������������������������������������JVM���������������������������������������������������������������������������������
���������������������������������������������������������������������������������������������������������
ByteBuffer.allocateDirect()������������������������
������������������
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ByteBuffer���������������������������byte������������������������������������������������ByteBuffer.asLongBuffer()���������������������������������������������������������������������������position-limit���
���������ByteBuffer.asCharBuffer():
ByteBuffer���������������������������CharBuffer���������������������CharBuffer���������������������������������������
���������������������
������������������������������byte������������������������������
���ByteBuffer���������������������������������������������������������������������������������������������������������������������������������������
������getInt()������������������������������������������������������������Int������������������
������������������MappedByteBufefer)���
������������������������������������������������������������������������������������FileChannel������������
发表评论
最新留言
关于作者
