108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * Copyright (c) 2000, 2002, Oracle and/or its affiliates. All rights reserved.
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * This code is free software; you can redistribute it and/or modify it
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * under the terms of the GNU General Public License version 2 only, as
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * published by the Free Software Foundation. Oracle designates this
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * particular file as subject to the "Classpath" exception as provided
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * by Oracle in the LICENSE file that accompanied this code.
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * This code is distributed in the hope that it will be useful, but WITHOUT
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * version 2 for more details (a copy is included in the LICENSE file that
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * accompanied this code).
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * You should have received a copy of the GNU General Public License version
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * 2 along with this work; if not, write to the Free Software Foundation,
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * or visit www.oracle.com if you need additional information or have any
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * questions.
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj#warn This file is preprocessed before being compiled
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * Relative <i>get</i> method for reading $a$ $type$ value.
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * <p> Reads the next $nbytes$ bytes at this buffer's current position,
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * composing them into $a$ $type$ value according to the current byte order,
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * and then increments the position by $nbytes$. </p>
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * @return The $type$ value at the buffer's current position
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * @throws BufferUnderflowException
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * If there are fewer than $nbytes$ bytes
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * remaining in this buffer
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * Relative <i>put</i> method for writing $a$ $type$
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * value <i>(optional operation)</i>.
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * <p> Writes $nbytes$ bytes containing the given $type$ value, in the
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * current byte order, into this buffer at the current position, and then
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * increments the position by $nbytes$. </p>
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * @param value
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * The $type$ value to be written
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * @return This buffer
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * @throws BufferOverflowException
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * If there are fewer than $nbytes$ bytes
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * remaining in this buffer
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * @throws ReadOnlyBufferException
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * If this buffer is read-only
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj public abstract ByteBuffer put$Type$($type$ value);
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * Absolute <i>get</i> method for reading $a$ $type$ value.
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * <p> Reads $nbytes$ bytes at the given index, composing them into a
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * $type$ value according to the current byte order. </p>
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * @param index
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * The index from which the bytes will be read
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * @return The $type$ value at the given index
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * @throws IndexOutOfBoundsException
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * If <tt>index</tt> is negative
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * or not smaller than the buffer's limit,
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * minus $nbytesButOne$
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * Absolute <i>put</i> method for writing $a$ $type$
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * value <i>(optional operation)</i>.
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * <p> Writes $nbytes$ bytes containing the given $type$ value, in the
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * current byte order, into this buffer at the given index. </p>
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * @param index
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * The index at which the bytes will be written
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * @param value
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * The $type$ value to be written
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * @return This buffer
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * @throws IndexOutOfBoundsException
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * If <tt>index</tt> is negative
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * or not smaller than the buffer's limit,
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * minus $nbytesButOne$
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * @throws ReadOnlyBufferException
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * If this buffer is read-only
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj public abstract ByteBuffer put$Type$(int index, $type$ value);
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * Creates a view of this byte buffer as $a$ $type$ buffer.
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * <p> The content of the new buffer will start at this buffer's current
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * position. Changes to this buffer's content will be visible in the new
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * buffer, and vice versa; the two buffers' position, limit, and mark
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * values will be independent.
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * <p> The new buffer's position will be zero, its capacity and its limit
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * will be the number of bytes remaining in this buffer divided by
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * $nbytes$, and its mark will be undefined. The new buffer will be direct
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * if, and only if, this buffer is direct, and it will be read-only if, and
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * only if, this buffer is read-only. </p>
108322fb1c3ed341aba9c80c9774df0ed9e35768carlsonj * @return A new $type$ buffer