equal
deleted
inserted
replaced
91 * |
91 * |
92 #end[byte] |
92 #end[byte] |
93 * |
93 * |
94 #if[byte] |
94 #if[byte] |
95 * |
95 * |
96 * <a name="direct"></a> |
96 * <a id="direct"></a> |
97 * <h2> Direct <i>vs.</i> non-direct buffers </h2> |
97 * <h2> Direct <i>vs.</i> non-direct buffers </h2> |
98 * |
98 * |
99 * <p> A byte buffer is either <i>direct</i> or <i>non-direct</i>. Given a |
99 * <p> A byte buffer is either <i>direct</i> or <i>non-direct</i>. Given a |
100 * direct byte buffer, the Java virtual machine will make a best effort to |
100 * direct byte buffer, the Java virtual machine will make a best effort to |
101 * perform native I/O operations directly upon it. That is, it will attempt to |
101 * perform native I/O operations directly upon it. That is, it will attempt to |
126 * <p> Whether a byte buffer is direct or non-direct may be determined by |
126 * <p> Whether a byte buffer is direct or non-direct may be determined by |
127 * invoking its {@link #isDirect isDirect} method. This method is provided so |
127 * invoking its {@link #isDirect isDirect} method. This method is provided so |
128 * that explicit buffer management can be done in performance-critical code. |
128 * that explicit buffer management can be done in performance-critical code. |
129 * |
129 * |
130 * |
130 * |
131 * <a name="bin"></a> |
131 * <a id="bin"></a> |
132 * <h2> Access to binary data </h2> |
132 * <h2> Access to binary data </h2> |
133 * |
133 * |
134 * <p> This class defines methods for reading and writing values of all other |
134 * <p> This class defines methods for reading and writing values of all other |
135 * primitive types, except {@code boolean}. Primitive values are translated |
135 * primitive types, except {@code boolean}. Primitive values are translated |
136 * to (or from) sequences of bytes according to the buffer's current byte |
136 * to (or from) sequences of bytes according to the buffer's current byte |
153 * <p> Corresponding methods are defined for the types {@code char, |
153 * <p> Corresponding methods are defined for the types {@code char, |
154 * short, int, long}, and {@code double}. The index |
154 * short, int, long}, and {@code double}. The index |
155 * parameters of the absolute <i>get</i> and <i>put</i> methods are in terms of |
155 * parameters of the absolute <i>get</i> and <i>put</i> methods are in terms of |
156 * bytes rather than of the type being read or written. |
156 * bytes rather than of the type being read or written. |
157 * |
157 * |
158 * <a name="views"></a> |
158 * <a id="views"></a> |
159 * |
159 * |
160 * <p> For access to homogeneous binary data, that is, sequences of values of |
160 * <p> For access to homogeneous binary data, that is, sequences of values of |
161 * the same type, this class defines methods that can create <i>views</i> of a |
161 * the same type, this class defines methods that can create <i>views</i> of a |
162 * given byte buffer. A <i>view buffer</i> is simply another buffer whose |
162 * given byte buffer. A <i>view buffer</i> is simply another buffer whose |
163 * content is backed by the byte buffer. Changes to the byte buffer's content |
163 * content is backed by the byte buffer. Changes to the byte buffer's content |