代码搜索:ByteBuffer

找到约 1,360 项符合「ByteBuffer」的源代码

代码结果 1,360
www.eeworm.com/read/127767/14336805

txt e168. determining if a bytebuffer is direct.txt

A non-direct ByteBuffer is one where the contents are stored in the normal memory. A direct ByteBuffer is one where the contents are stored in some I/O device such as a disk drive or video board. Se
www.eeworm.com/read/127767/14336809

txt e160. putting bytes into a bytebuffer.txt

A ByteBuffer has a capacity which determines how many bytes it contains. This capacity can never change. Any byte in the ByteBuffer can be modified using the absolute version of put(), which takes an
www.eeworm.com/read/127767/14336292

txt e159. getting bytes from a bytebuffer.txt

A ByteBuffer has a capacity that determines how many bytes it contains. This capacity can never change. Any byte in the buffer can be retrieved using the absolute version of get(), which takes an inde
www.eeworm.com/read/127767/14336702

txt e165. setting the byte ordering for a bytebuffer.txt

By default, the byte ordering for a ByteBuffer is ByteOrder.BIG_ENDIAN. This means that if you put a multibyte value into the buffer, the most significant byte is written out first. With LITTLE_ENDIAN
www.eeworm.com/read/127767/14336768

txt e171. writing and appending a bytebuffer to a file.txt

If you have one or more ByteBuffers to dump to a file, use a FileChannel. // Write bbuf to filename ByteBuffer bbuf = getMyData(); File file = new File("filename"); // Set t
www.eeworm.com/read/127767/14336934

txt e169. reading from a channel with a bytebuffer.txt

This example uses a ByteBuffer to read from a channel. The tricky part of this operation is to remember to properly set the buffer's position before and after a read. try { // Obtain a
www.eeworm.com/read/127767/14337889

txt e164. using a bytebuffer to store strings.txt

This example demonstrates how to use a ByteBuffer to store characters. For example, an application may want to store strings in a file to avoid the conversion to and from bytes. The example creates a
www.eeworm.com/read/162614/5532912

java channelreader.java

/* ChannelReader.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. GNU Classpath is free software; you can redistribute it and/or modify it under the
www.eeworm.com/read/162519/5542444

java channelreader.java

/* ChannelReader.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. GNU Classpath is free software; you can redistribute it and/or modify it under the
www.eeworm.com/read/127767/14337940

txt e161. converting between a bytebuffer an a byte array.txt

// Create a ByteBuffer from a byte array byte[] bytes = new byte[10]; ByteBuffer buf = ByteBuffer.wrap(bytes); // Retrieve bytes between the position and limit // (see e160 P