1 /*
2  * Copyright (C) 2014 The Android Open Source Project
3  * Copyright (c) 1994, 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.io;
28 
29 import android.compat.annotation.UnsupportedAppUsage;
30 
31 @SuppressWarnings({"unchecked", "deprecation", "all"})
32 public class RandomAccessFile implements java.io.DataOutput, java.io.DataInput, java.io.Closeable {
33 
RandomAccessFile(java.lang.String name, java.lang.String mode)34     public RandomAccessFile(java.lang.String name, java.lang.String mode)
35             throws java.io.FileNotFoundException {
36         throw new RuntimeException("Stub!");
37     }
38 
RandomAccessFile(java.io.File file, java.lang.String mode)39     public RandomAccessFile(java.io.File file, java.lang.String mode)
40             throws java.io.FileNotFoundException {
41         throw new RuntimeException("Stub!");
42     }
43 
maybeSync()44     private void maybeSync() {
45         throw new RuntimeException("Stub!");
46     }
47 
getFD()48     public final java.io.FileDescriptor getFD() throws java.io.IOException {
49         throw new RuntimeException("Stub!");
50     }
51 
getChannel()52     public final java.nio.channels.FileChannel getChannel() {
53         throw new RuntimeException("Stub!");
54     }
55 
read()56     public int read() throws java.io.IOException {
57         throw new RuntimeException("Stub!");
58     }
59 
readBytes(byte[] b, int off, int len)60     private int readBytes(byte[] b, int off, int len) throws java.io.IOException {
61         throw new RuntimeException("Stub!");
62     }
63 
read(byte[] b, int off, int len)64     public int read(byte[] b, int off, int len) throws java.io.IOException {
65         throw new RuntimeException("Stub!");
66     }
67 
read(byte[] b)68     public int read(byte[] b) throws java.io.IOException {
69         throw new RuntimeException("Stub!");
70     }
71 
readFully(byte[] b)72     public final void readFully(byte[] b) throws java.io.IOException {
73         throw new RuntimeException("Stub!");
74     }
75 
readFully(byte[] b, int off, int len)76     public final void readFully(byte[] b, int off, int len) throws java.io.IOException {
77         throw new RuntimeException("Stub!");
78     }
79 
skipBytes(int n)80     public int skipBytes(int n) throws java.io.IOException {
81         throw new RuntimeException("Stub!");
82     }
83 
write(int b)84     public void write(int b) throws java.io.IOException {
85         throw new RuntimeException("Stub!");
86     }
87 
writeBytes(byte[] b, int off, int len)88     private void writeBytes(byte[] b, int off, int len) throws java.io.IOException {
89         throw new RuntimeException("Stub!");
90     }
91 
write(byte[] b)92     public void write(byte[] b) throws java.io.IOException {
93         throw new RuntimeException("Stub!");
94     }
95 
write(byte[] b, int off, int len)96     public void write(byte[] b, int off, int len) throws java.io.IOException {
97         throw new RuntimeException("Stub!");
98     }
99 
getFilePointer()100     public long getFilePointer() throws java.io.IOException {
101         throw new RuntimeException("Stub!");
102     }
103 
seek(long pos)104     public void seek(long pos) throws java.io.IOException {
105         throw new RuntimeException("Stub!");
106     }
107 
length()108     public long length() throws java.io.IOException {
109         throw new RuntimeException("Stub!");
110     }
111 
setLength(long newLength)112     public void setLength(long newLength) throws java.io.IOException {
113         throw new RuntimeException("Stub!");
114     }
115 
close()116     public void close() throws java.io.IOException {
117         throw new RuntimeException("Stub!");
118     }
119 
readBoolean()120     public final boolean readBoolean() throws java.io.IOException {
121         throw new RuntimeException("Stub!");
122     }
123 
readByte()124     public final byte readByte() throws java.io.IOException {
125         throw new RuntimeException("Stub!");
126     }
127 
readUnsignedByte()128     public final int readUnsignedByte() throws java.io.IOException {
129         throw new RuntimeException("Stub!");
130     }
131 
readShort()132     public final short readShort() throws java.io.IOException {
133         throw new RuntimeException("Stub!");
134     }
135 
readUnsignedShort()136     public final int readUnsignedShort() throws java.io.IOException {
137         throw new RuntimeException("Stub!");
138     }
139 
readChar()140     public final char readChar() throws java.io.IOException {
141         throw new RuntimeException("Stub!");
142     }
143 
readInt()144     public final int readInt() throws java.io.IOException {
145         throw new RuntimeException("Stub!");
146     }
147 
readLong()148     public final long readLong() throws java.io.IOException {
149         throw new RuntimeException("Stub!");
150     }
151 
readFloat()152     public final float readFloat() throws java.io.IOException {
153         throw new RuntimeException("Stub!");
154     }
155 
readDouble()156     public final double readDouble() throws java.io.IOException {
157         throw new RuntimeException("Stub!");
158     }
159 
readLine()160     public final java.lang.String readLine() throws java.io.IOException {
161         throw new RuntimeException("Stub!");
162     }
163 
readUTF()164     public final java.lang.String readUTF() throws java.io.IOException {
165         throw new RuntimeException("Stub!");
166     }
167 
writeBoolean(boolean v)168     public final void writeBoolean(boolean v) throws java.io.IOException {
169         throw new RuntimeException("Stub!");
170     }
171 
writeByte(int v)172     public final void writeByte(int v) throws java.io.IOException {
173         throw new RuntimeException("Stub!");
174     }
175 
writeShort(int v)176     public final void writeShort(int v) throws java.io.IOException {
177         throw new RuntimeException("Stub!");
178     }
179 
writeChar(int v)180     public final void writeChar(int v) throws java.io.IOException {
181         throw new RuntimeException("Stub!");
182     }
183 
writeInt(int v)184     public final void writeInt(int v) throws java.io.IOException {
185         throw new RuntimeException("Stub!");
186     }
187 
writeLong(long v)188     public final void writeLong(long v) throws java.io.IOException {
189         throw new RuntimeException("Stub!");
190     }
191 
writeFloat(float v)192     public final void writeFloat(float v) throws java.io.IOException {
193         throw new RuntimeException("Stub!");
194     }
195 
writeDouble(double v)196     public final void writeDouble(double v) throws java.io.IOException {
197         throw new RuntimeException("Stub!");
198     }
199 
writeBytes(java.lang.String s)200     public final void writeBytes(java.lang.String s) throws java.io.IOException {
201         throw new RuntimeException("Stub!");
202     }
203 
writeChars(java.lang.String s)204     public final void writeChars(java.lang.String s) throws java.io.IOException {
205         throw new RuntimeException("Stub!");
206     }
207 
writeUTF(java.lang.String str)208     public final void writeUTF(java.lang.String str) throws java.io.IOException {
209         throw new RuntimeException("Stub!");
210     }
211 
finalize()212     protected void finalize() throws java.lang.Throwable {
213         throw new RuntimeException("Stub!");
214     }
215 
216     private static final int FLUSH_FDATASYNC = 2; // 0x2
217 
218     private static final int FLUSH_FSYNC = 1; // 0x1
219 
220     private static final int FLUSH_NONE = 0; // 0x0
221 
222     private java.nio.channels.FileChannel channel;
223 
224     private java.lang.Object closeLock;
225 
226     private volatile boolean closed = false;
227 
228     @UnsupportedAppUsage
229     private java.io.FileDescriptor fd;
230 
231     private int flushAfterWrite = 0; // 0x0
232 
233     private final dalvik.system.CloseGuard guard;
234 
235     {
236         guard = null;
237     }
238 
239     private final libcore.io.IoTracker ioTracker;
240 
241     {
242         ioTracker = null;
243     }
244 
245     private int mode;
246 
247     private final java.lang.String path;
248 
249     {
250         path = null;
251     }
252 
253     private boolean rw;
254 
255     private final byte[] scratch;
256 
257     {
258         scratch = new byte[0];
259     }
260 }
261