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 import dalvik.annotation.compat.UnsupportedAppUsage; 30 31 @SuppressWarnings({"unchecked", "deprecation", "all"}) 32 public abstract class Buffer { 33 Buffer(int mark, int pos, int lim, int cap, int elementSizeShift)34 Buffer(int mark, int pos, int lim, int cap, int elementSizeShift) { 35 throw new RuntimeException("Stub!"); 36 } 37 capacity()38 public final int capacity() { 39 throw new RuntimeException("Stub!"); 40 } 41 position()42 public final int position() { 43 throw new RuntimeException("Stub!"); 44 } 45 position(int newPosition)46 public final java.nio.Buffer position(int newPosition) { 47 throw new RuntimeException("Stub!"); 48 } 49 limit()50 public final int limit() { 51 throw new RuntimeException("Stub!"); 52 } 53 limit(int newLimit)54 public final java.nio.Buffer limit(int newLimit) { 55 throw new RuntimeException("Stub!"); 56 } 57 mark()58 public final java.nio.Buffer mark() { 59 throw new RuntimeException("Stub!"); 60 } 61 reset()62 public final java.nio.Buffer reset() { 63 throw new RuntimeException("Stub!"); 64 } 65 clear()66 public final java.nio.Buffer clear() { 67 throw new RuntimeException("Stub!"); 68 } 69 flip()70 public final java.nio.Buffer flip() { 71 throw new RuntimeException("Stub!"); 72 } 73 rewind()74 public final java.nio.Buffer rewind() { 75 throw new RuntimeException("Stub!"); 76 } 77 remaining()78 public final int remaining() { 79 throw new RuntimeException("Stub!"); 80 } 81 hasRemaining()82 public final boolean hasRemaining() { 83 throw new RuntimeException("Stub!"); 84 } 85 isReadOnly()86 public abstract boolean isReadOnly(); 87 hasArray()88 public abstract boolean hasArray(); 89 array()90 public abstract java.lang.Object array(); 91 arrayOffset()92 public abstract int arrayOffset(); 93 isDirect()94 public abstract boolean isDirect(); 95 nextGetIndex()96 final int nextGetIndex() { 97 throw new RuntimeException("Stub!"); 98 } 99 nextGetIndex(int nb)100 final int nextGetIndex(int nb) { 101 throw new RuntimeException("Stub!"); 102 } 103 nextPutIndex()104 final int nextPutIndex() { 105 throw new RuntimeException("Stub!"); 106 } 107 nextPutIndex(int nb)108 final int nextPutIndex(int nb) { 109 throw new RuntimeException("Stub!"); 110 } 111 checkIndex(int i)112 final int checkIndex(int i) { 113 throw new RuntimeException("Stub!"); 114 } 115 checkIndex(int i, int nb)116 final int checkIndex(int i, int nb) { 117 throw new RuntimeException("Stub!"); 118 } 119 markValue()120 final int markValue() { 121 throw new RuntimeException("Stub!"); 122 } 123 truncate()124 final void truncate() { 125 throw new RuntimeException("Stub!"); 126 } 127 discardMark()128 final void discardMark() { 129 throw new RuntimeException("Stub!"); 130 } 131 checkBounds(int off, int len, int size)132 static void checkBounds(int off, int len, int size) { 133 throw new RuntimeException("Stub!"); 134 } 135 getElementSizeShift()136 public int getElementSizeShift() { 137 throw new RuntimeException("Stub!"); 138 } 139 140 static final int SPLITERATOR_CHARACTERISTICS = 16464; // 0x4050 141 142 @UnsupportedAppUsage 143 final int _elementSizeShift; 144 145 { 146 _elementSizeShift = 0; 147 } 148 149 @UnsupportedAppUsage 150 long address; 151 152 @UnsupportedAppUsage 153 private int capacity; 154 155 @UnsupportedAppUsage 156 private int limit; 157 158 private int mark = -1; // 0xffffffff 159 160 @UnsupportedAppUsage 161 int position = 0; // 0x0 162 } 163