1 /*
2 * Copyright (C) 2014 The Android Open Source Project
3 * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 *
6 * This code is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 only, as
8 * published by the Free Software Foundation. Oracle designates this
9 * particular file as subject to the "Classpath" exception as provided
10 * by Oracle in the LICENSE file that accompanied this code.
11 *
12 * This code is distributed in the hope that it will be useful, but WITHOUT
13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 * version 2 for more details (a copy is included in the LICENSE file that
16 * accompanied this code).
17 *
18 * You should have received a copy of the GNU General Public License version
19 * 2 along with this work; if not, write to the Free Software Foundation,
20 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
21 *
22 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
23 * or visit www.oracle.com if you need additional information or have any
24 * questions.
25 */
26
27 package java.nio;
28
29
30 @SuppressWarnings({"unchecked", "deprecation", "all"})
31 public abstract class ByteBuffer extends java.nio.Buffer implements java.lang.Comparable<java.nio.ByteBuffer> {
32
ByteBuffer(int mark, int pos, int lim, int cap)33 ByteBuffer(int mark, int pos, int lim, int cap) { super(0, 0, 0, 0, 0); throw new RuntimeException("Stub!"); }
34
allocateDirect(int capacity)35 @libcore.util.NonNull public static java.nio.ByteBuffer allocateDirect(int capacity) { throw new RuntimeException("Stub!"); }
36
allocate(int capacity)37 @libcore.util.NonNull public static java.nio.ByteBuffer allocate(int capacity) { throw new RuntimeException("Stub!"); }
38
wrap(byte @libcore.util.NonNull [] array, int offset, int length)39 @libcore.util.NonNull public static java.nio.ByteBuffer wrap(byte @libcore.util.NonNull [] array, int offset, int length) { throw new RuntimeException("Stub!"); }
40
wrap(byte @libcore.util.NonNull [] array)41 @libcore.util.NonNull public static java.nio.ByteBuffer wrap(byte @libcore.util.NonNull [] array) { throw new RuntimeException("Stub!"); }
42
slice()43 @libcore.util.NonNull public abstract java.nio.ByteBuffer slice();
44
duplicate()45 @libcore.util.NonNull public abstract java.nio.ByteBuffer duplicate();
46
asReadOnlyBuffer()47 @libcore.util.NonNull public abstract java.nio.ByteBuffer asReadOnlyBuffer();
48
get()49 public abstract byte get();
50
put(byte b)51 @libcore.util.NonNull public abstract java.nio.ByteBuffer put(byte b);
52
get(int index)53 public abstract byte get(int index);
54
put(int index, byte b)55 @libcore.util.NonNull public abstract java.nio.ByteBuffer put(int index, byte b);
56
get(byte @libcore.util.NonNull [] dst, int offset, int length)57 @libcore.util.NonNull public java.nio.ByteBuffer get(byte @libcore.util.NonNull [] dst, int offset, int length) { throw new RuntimeException("Stub!"); }
58
get(byte @libcore.util.NonNull [] dst)59 @libcore.util.NonNull public java.nio.ByteBuffer get(byte @libcore.util.NonNull [] dst) { throw new RuntimeException("Stub!"); }
60
put(@ibcore.util.NonNull java.nio.ByteBuffer src)61 @libcore.util.NonNull public java.nio.ByteBuffer put(@libcore.util.NonNull java.nio.ByteBuffer src) { throw new RuntimeException("Stub!"); }
62
put(byte @libcore.util.NonNull [] src, int offset, int length)63 @libcore.util.NonNull public java.nio.ByteBuffer put(byte @libcore.util.NonNull [] src, int offset, int length) { throw new RuntimeException("Stub!"); }
64
put(byte @libcore.util.NonNull [] src)65 @libcore.util.NonNull public final java.nio.ByteBuffer put(byte @libcore.util.NonNull [] src) { throw new RuntimeException("Stub!"); }
66
hasArray()67 public final boolean hasArray() { throw new RuntimeException("Stub!"); }
68
array()69 public final byte @libcore.util.NonNull [] array() { throw new RuntimeException("Stub!"); }
70
arrayOffset()71 public final int arrayOffset() { throw new RuntimeException("Stub!"); }
72
position(int newPosition)73 @libcore.util.NonNull public java.nio.Buffer position(int newPosition) { throw new RuntimeException("Stub!"); }
74
limit(int newLimit)75 @libcore.util.NonNull public java.nio.Buffer limit(int newLimit) { throw new RuntimeException("Stub!"); }
76
mark()77 @libcore.util.NonNull public java.nio.Buffer mark() { throw new RuntimeException("Stub!"); }
78
reset()79 @libcore.util.NonNull public java.nio.Buffer reset() { throw new RuntimeException("Stub!"); }
80
clear()81 @libcore.util.NonNull public java.nio.Buffer clear() { throw new RuntimeException("Stub!"); }
82
flip()83 @libcore.util.NonNull public java.nio.Buffer flip() { throw new RuntimeException("Stub!"); }
84
rewind()85 @libcore.util.NonNull public java.nio.Buffer rewind() { throw new RuntimeException("Stub!"); }
86
compact()87 @libcore.util.NonNull public abstract java.nio.ByteBuffer compact();
88
isDirect()89 public abstract boolean isDirect();
90
toString()91 @libcore.util.NonNull public java.lang.String toString() { throw new RuntimeException("Stub!"); }
92
hashCode()93 public int hashCode() { throw new RuntimeException("Stub!"); }
94
equals(@ibcore.util.Nullable java.lang.Object ob)95 public boolean equals(@libcore.util.Nullable java.lang.Object ob) { throw new RuntimeException("Stub!"); }
96
compareTo(@ibcore.util.NonNull java.nio.ByteBuffer that)97 public int compareTo(@libcore.util.NonNull java.nio.ByteBuffer that) { throw new RuntimeException("Stub!"); }
98
order()99 @libcore.util.NonNull public final java.nio.ByteOrder order() { throw new RuntimeException("Stub!"); }
100
order(@ibcore.util.NonNull java.nio.ByteOrder bo)101 @libcore.util.NonNull public final java.nio.ByteBuffer order(@libcore.util.NonNull java.nio.ByteOrder bo) { throw new RuntimeException("Stub!"); }
102
alignedSlice(int unitSize)103 @libcore.util.NonNull public final java.nio.ByteBuffer alignedSlice(int unitSize) { throw new RuntimeException("Stub!"); }
104
getChar()105 public abstract char getChar();
106
putChar(char value)107 @libcore.util.NonNull public abstract java.nio.ByteBuffer putChar(char value);
108
getChar(int index)109 public abstract char getChar(int index);
110
putChar(int index, char value)111 @libcore.util.NonNull public abstract java.nio.ByteBuffer putChar(int index, char value);
112
asCharBuffer()113 @libcore.util.NonNull public abstract java.nio.CharBuffer asCharBuffer();
114
getShort()115 public abstract short getShort();
116
putShort(short value)117 @libcore.util.NonNull public abstract java.nio.ByteBuffer putShort(short value);
118
getShort(int index)119 public abstract short getShort(int index);
120
putShort(int index, short value)121 @libcore.util.NonNull public abstract java.nio.ByteBuffer putShort(int index, short value);
122
asShortBuffer()123 @libcore.util.NonNull public abstract java.nio.ShortBuffer asShortBuffer();
124
getInt()125 public abstract int getInt();
126
putInt(int value)127 @libcore.util.NonNull public abstract java.nio.ByteBuffer putInt(int value);
128
getInt(int index)129 public abstract int getInt(int index);
130
putInt(int index, int value)131 @libcore.util.NonNull public abstract java.nio.ByteBuffer putInt(int index, int value);
132
asIntBuffer()133 @libcore.util.NonNull public abstract java.nio.IntBuffer asIntBuffer();
134
getLong()135 public abstract long getLong();
136
putLong(long value)137 @libcore.util.NonNull public abstract java.nio.ByteBuffer putLong(long value);
138
getLong(int index)139 public abstract long getLong(int index);
140
putLong(int index, long value)141 @libcore.util.NonNull public abstract java.nio.ByteBuffer putLong(int index, long value);
142
asLongBuffer()143 @libcore.util.NonNull public abstract java.nio.LongBuffer asLongBuffer();
144
getFloat()145 public abstract float getFloat();
146
putFloat(float value)147 @libcore.util.NonNull public abstract java.nio.ByteBuffer putFloat(float value);
148
getFloat(int index)149 public abstract float getFloat(int index);
150
putFloat(int index, float value)151 @libcore.util.NonNull public abstract java.nio.ByteBuffer putFloat(int index, float value);
152
asFloatBuffer()153 @libcore.util.NonNull public abstract java.nio.FloatBuffer asFloatBuffer();
154
getDouble()155 public abstract double getDouble();
156
putDouble(double value)157 @libcore.util.NonNull public abstract java.nio.ByteBuffer putDouble(double value);
158
getDouble(int index)159 public abstract double getDouble(int index);
160
putDouble(int index, double value)161 @libcore.util.NonNull public abstract java.nio.ByteBuffer putDouble(int index, double value);
162
asDoubleBuffer()163 @libcore.util.NonNull public abstract java.nio.DoubleBuffer asDoubleBuffer();
164 }
165