|
1 /* |
|
2 * Copyright 2000-2002 Sun Microsystems, Inc. All Rights Reserved. |
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
|
4 * |
|
5 * This code is free software; you can redistribute it and/or modify it |
|
6 * under the terms of the GNU General Public License version 2 only, as |
|
7 * published by the Free Software Foundation. Sun designates this |
|
8 * particular file as subject to the "Classpath" exception as provided |
|
9 * by Sun in the LICENSE file that accompanied this code. |
|
10 * |
|
11 * This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 * version 2 for more details (a copy is included in the LICENSE file that |
|
15 * accompanied this code). |
|
16 * |
|
17 * You should have received a copy of the GNU General Public License version |
|
18 * 2 along with this work; if not, write to the Free Software Foundation, |
|
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 * |
|
21 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, |
|
22 * CA 95054 USA or visit www.sun.com if you need additional information or |
|
23 * have any questions. |
|
24 */ |
|
25 |
|
26 #warn This file is preprocessed before being compiled |
|
27 |
|
28 class XXX { |
|
29 |
|
30 #begin |
|
31 |
|
32 /** |
|
33 * Relative <i>get</i> method for reading $a$ $type$ value. |
|
34 * |
|
35 * <p> Reads the next $nbytes$ bytes at this buffer's current position, |
|
36 * composing them into $a$ $type$ value according to the current byte order, |
|
37 * and then increments the position by $nbytes$. </p> |
|
38 * |
|
39 * @return The $type$ value at the buffer's current position |
|
40 * |
|
41 * @throws BufferUnderflowException |
|
42 * If there are fewer than $nbytes$ bytes |
|
43 * remaining in this buffer |
|
44 */ |
|
45 public abstract $type$ get$Type$(); |
|
46 |
|
47 /** |
|
48 * Relative <i>put</i> method for writing $a$ $type$ |
|
49 * value <i>(optional operation)</i>. |
|
50 * |
|
51 * <p> Writes $nbytes$ bytes containing the given $type$ value, in the |
|
52 * current byte order, into this buffer at the current position, and then |
|
53 * increments the position by $nbytes$. </p> |
|
54 * |
|
55 * @param value |
|
56 * The $type$ value to be written |
|
57 * |
|
58 * @return This buffer |
|
59 * |
|
60 * @throws BufferOverflowException |
|
61 * If there are fewer than $nbytes$ bytes |
|
62 * remaining in this buffer |
|
63 * |
|
64 * @throws ReadOnlyBufferException |
|
65 * If this buffer is read-only |
|
66 */ |
|
67 public abstract ByteBuffer put$Type$($type$ value); |
|
68 |
|
69 /** |
|
70 * Absolute <i>get</i> method for reading $a$ $type$ value. |
|
71 * |
|
72 * <p> Reads $nbytes$ bytes at the given index, composing them into a |
|
73 * $type$ value according to the current byte order. </p> |
|
74 * |
|
75 * @param index |
|
76 * The index from which the bytes will be read |
|
77 * |
|
78 * @return The $type$ value at the given index |
|
79 * |
|
80 * @throws IndexOutOfBoundsException |
|
81 * If <tt>index</tt> is negative |
|
82 * or not smaller than the buffer's limit, |
|
83 * minus $nbytesButOne$ |
|
84 */ |
|
85 public abstract $type$ get$Type$(int index); |
|
86 |
|
87 /** |
|
88 * Absolute <i>put</i> method for writing $a$ $type$ |
|
89 * value <i>(optional operation)</i>. |
|
90 * |
|
91 * <p> Writes $nbytes$ bytes containing the given $type$ value, in the |
|
92 * current byte order, into this buffer at the given index. </p> |
|
93 * |
|
94 * @param index |
|
95 * The index at which the bytes will be written |
|
96 * |
|
97 * @param value |
|
98 * The $type$ value to be written |
|
99 * |
|
100 * @return This buffer |
|
101 * |
|
102 * @throws IndexOutOfBoundsException |
|
103 * If <tt>index</tt> is negative |
|
104 * or not smaller than the buffer's limit, |
|
105 * minus $nbytesButOne$ |
|
106 * |
|
107 * @throws ReadOnlyBufferException |
|
108 * If this buffer is read-only |
|
109 */ |
|
110 public abstract ByteBuffer put$Type$(int index, $type$ value); |
|
111 |
|
112 /** |
|
113 * Creates a view of this byte buffer as $a$ $type$ buffer. |
|
114 * |
|
115 * <p> The content of the new buffer will start at this buffer's current |
|
116 * position. Changes to this buffer's content will be visible in the new |
|
117 * buffer, and vice versa; the two buffers' position, limit, and mark |
|
118 * values will be independent. |
|
119 * |
|
120 * <p> The new buffer's position will be zero, its capacity and its limit |
|
121 * will be the number of bytes remaining in this buffer divided by |
|
122 * $nbytes$, and its mark will be undefined. The new buffer will be direct |
|
123 * if, and only if, this buffer is direct, and it will be read-only if, and |
|
124 * only if, this buffer is read-only. </p> |
|
125 * |
|
126 * @return A new $type$ buffer |
|
127 */ |
|
128 public abstract $Type$Buffer as$Type$Buffer(); |
|
129 |
|
130 #end |
|
131 |
|
132 } |