All Downloads are FREE. Search and download functionalities are using the official Maven repository.

java.nio.X-Buffer-bin.template Maven / Gradle / Ivy

There is a newer version: 17.alpha.0.57
Show newest version
/*
 * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * This code is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License version 2 only, as
 * published by the Free Software Foundation.  Oracle designates this
 * particular file as subject to the "Classpath" exception as provided
 * by Oracle in the LICENSE file that accompanied this code.
 *
 * This code is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 * version 2 for more details (a copy is included in the LICENSE file that
 * accompanied this code).
 *
 * You should have received a copy of the GNU General Public License version
 * 2 along with this work; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 *
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 * or visit www.oracle.com if you need additional information or have any
 * questions.
 */

#warn This file is preprocessed before being compiled

class XXX {

#begin

    /**
     * Relative get method for reading $a$ $type$ value.
     *
     * 

Reads the next $nbytes$ bytes at this buffer's current position, * composing them into $a$ $type$ value according to the current byte order, * and then increments the position by $nbytes$.

* * @return The $type$ value at the buffer's current position * * @throws BufferUnderflowException * If there are fewer than $nbytes$ bytes * remaining in this buffer */ public abstract $type$ get$Type$(); /** * Relative put method for writing $a$ $type$ * value  (optional operation). * *

Writes $nbytes$ bytes containing the given $type$ value, in the * current byte order, into this buffer at the current position, and then * increments the position by $nbytes$.

* * @param value * The $type$ value to be written * * @return This buffer * * @throws BufferOverflowException * If there are fewer than $nbytes$ bytes * remaining in this buffer * * @throws ReadOnlyBufferException * If this buffer is read-only */ public abstract ByteBuffer put$Type$($type$ value); /** * Absolute get method for reading $a$ $type$ value. * *

Reads $nbytes$ bytes at the given index, composing them into a * $type$ value according to the current byte order.

* * @param index * The index from which the bytes will be read * * @return The $type$ value at the given index * * @throws IndexOutOfBoundsException * If {@code index} is negative * or not smaller than the buffer's limit, * minus $nbytesButOne$ */ public abstract $type$ get$Type$(int index); /** * Absolute put method for writing $a$ $type$ * value  (optional operation). * *

Writes $nbytes$ bytes containing the given $type$ value, in the * current byte order, into this buffer at the given index.

* * @param index * The index at which the bytes will be written * * @param value * The $type$ value to be written * * @return This buffer * * @throws IndexOutOfBoundsException * If {@code index} is negative * or not smaller than the buffer's limit, * minus $nbytesButOne$ * * @throws ReadOnlyBufferException * If this buffer is read-only */ public abstract ByteBuffer put$Type$(int index, $type$ value); /** * Creates a view of this byte buffer as $a$ $type$ buffer. * *

The content of the new buffer will start at this buffer's current * position. Changes to this buffer's content will be visible in the new * buffer, and vice versa; the two buffers' position, limit, and mark * values will be independent. * *

The new buffer's position will be zero, its capacity and its limit * will be the number of bytes remaining in this buffer divided by * $nbytes$, its mark will be undefined, and its byte order will be that * of the byte buffer at the moment the view is created. The new buffer * will be direct if, and only if, this buffer is direct, and it will be * read-only if, and only if, this buffer is read-only.

* * @return A new $type$ buffer */ public abstract $Type$Buffer as$Type$Buffer(); #end }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy