|
|
@ -9,165 +9,161 @@ package java.io;
|
|
|
|
|
|
|
|
|
|
|
|
import com.facebook.infer.builtins.InferBuiltins;
|
|
|
|
import com.facebook.infer.builtins.InferBuiltins;
|
|
|
|
import com.facebook.infer.builtins.InferUndefined;
|
|
|
|
import com.facebook.infer.builtins.InferUndefined;
|
|
|
|
|
|
|
|
|
|
|
|
import java.nio.FileChannelImpl;
|
|
|
|
import java.nio.FileChannelImpl;
|
|
|
|
import java.nio.channels.FileChannel;
|
|
|
|
import java.nio.channels.FileChannel;
|
|
|
|
|
|
|
|
|
|
|
|
public class RandomAccessFile implements Closeable {
|
|
|
|
public class RandomAccessFile implements Closeable {
|
|
|
|
|
|
|
|
|
|
|
|
private FileDescriptor fd;
|
|
|
|
private FileDescriptor fd;
|
|
|
|
private FileChannel channel;
|
|
|
|
private FileChannel channel;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public RandomAccessFile(String name, String mode)
|
|
|
|
public RandomAccessFile(String name, String mode) throws FileNotFoundException {
|
|
|
|
throws FileNotFoundException {
|
|
|
|
InferBuiltins.__set_file_attribute(this);
|
|
|
|
InferBuiltins.__set_file_attribute(this);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public RandomAccessFile(File file, String mode)
|
|
|
|
public RandomAccessFile(File file, String mode) throws FileNotFoundException {
|
|
|
|
throws FileNotFoundException {
|
|
|
|
InferBuiltins.__set_file_attribute(this);
|
|
|
|
InferBuiltins.__set_file_attribute(this);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public FileChannel getChannel() {
|
|
|
|
public FileChannel getChannel() {
|
|
|
|
channel = new FileChannelImpl(this, fd, InferUndefined.int_undefined());
|
|
|
|
channel = new FileChannelImpl(this, fd, InferUndefined.int_undefined());
|
|
|
|
return channel;
|
|
|
|
return channel;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void close() throws IOException {
|
|
|
|
public void close() throws IOException {
|
|
|
|
InferBuiltins.__set_mem_attribute(this);
|
|
|
|
InferBuiltins.__set_mem_attribute(this);
|
|
|
|
InferUndefined.can_throw_ioexception_void();
|
|
|
|
InferUndefined.can_throw_ioexception_void();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public int read() throws IOException {
|
|
|
|
public int read() throws IOException {
|
|
|
|
return InferUndefined.can_throw_ioexception_int();
|
|
|
|
return InferUndefined.can_throw_ioexception_int();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public int read(byte b[], int off, int len) throws IOException {
|
|
|
|
public int read(byte b[], int off, int len) throws IOException {
|
|
|
|
return InferUndefined.can_throw_ioexception_int();
|
|
|
|
return InferUndefined.can_throw_ioexception_int();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public int read(byte b[]) throws IOException {
|
|
|
|
public int read(byte b[]) throws IOException {
|
|
|
|
return InferUndefined.can_throw_ioexception_int();
|
|
|
|
return InferUndefined.can_throw_ioexception_int();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public final void readFully(byte b[]) throws IOException {
|
|
|
|
public final void readFully(byte b[]) throws IOException {
|
|
|
|
InferUndefined.can_throw_ioexception_void();
|
|
|
|
InferUndefined.can_throw_ioexception_void();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public final void readFully(byte b[], int off, int len) throws IOException {
|
|
|
|
public final void readFully(byte b[], int off, int len) throws IOException {
|
|
|
|
InferUndefined.can_throw_ioexception_void();
|
|
|
|
InferUndefined.can_throw_ioexception_void();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void write(int b) throws IOException {
|
|
|
|
public void write(int b) throws IOException {
|
|
|
|
InferUndefined.can_throw_ioexception_void();
|
|
|
|
InferUndefined.can_throw_ioexception_void();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void write(byte b[]) throws IOException {
|
|
|
|
public void write(byte b[]) throws IOException {
|
|
|
|
InferUndefined.can_throw_ioexception_void();
|
|
|
|
InferUndefined.can_throw_ioexception_void();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void write(byte b[], int off, int len) throws IOException {
|
|
|
|
public void write(byte b[], int off, int len) throws IOException {
|
|
|
|
InferUndefined.can_throw_ioexception_void();
|
|
|
|
InferUndefined.can_throw_ioexception_void();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void seek(long pos) throws IOException {
|
|
|
|
public void seek(long pos) throws IOException {
|
|
|
|
InferUndefined.can_throw_ioexception_void();
|
|
|
|
InferUndefined.can_throw_ioexception_void();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public long length() throws IOException {
|
|
|
|
public long length() throws IOException {
|
|
|
|
return InferUndefined.can_throw_ioexception_long();
|
|
|
|
return InferUndefined.can_throw_ioexception_long();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public final boolean readBoolean() throws IOException {
|
|
|
|
public final boolean readBoolean() throws IOException {
|
|
|
|
return InferUndefined.can_throw_ioexception_boolean();
|
|
|
|
return InferUndefined.can_throw_ioexception_boolean();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public final byte readByte() throws IOException {
|
|
|
|
public final byte readByte() throws IOException {
|
|
|
|
return InferUndefined.can_throw_ioexception_byte();
|
|
|
|
return InferUndefined.can_throw_ioexception_byte();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public final int readUnsignedByte() throws IOException {
|
|
|
|
public final int readUnsignedByte() throws IOException {
|
|
|
|
return InferUndefined.can_throw_ioexception_int();
|
|
|
|
return InferUndefined.can_throw_ioexception_int();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public final short readShort() throws IOException {
|
|
|
|
public final short readShort() throws IOException {
|
|
|
|
return InferUndefined.can_throw_ioexception_short();
|
|
|
|
return InferUndefined.can_throw_ioexception_short();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public final int readUnsignedShort() throws IOException {
|
|
|
|
public final int readUnsignedShort() throws IOException {
|
|
|
|
return InferUndefined.can_throw_ioexception_int();
|
|
|
|
return InferUndefined.can_throw_ioexception_int();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public final char readChar() throws IOException {
|
|
|
|
public final char readChar() throws IOException {
|
|
|
|
return InferUndefined.can_throw_ioexception_char();
|
|
|
|
return InferUndefined.can_throw_ioexception_char();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public final int readInt() throws IOException {
|
|
|
|
public final int readInt() throws IOException {
|
|
|
|
return InferUndefined.can_throw_ioexception_int();
|
|
|
|
return InferUndefined.can_throw_ioexception_int();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public final long readLong() throws IOException {
|
|
|
|
public final long readLong() throws IOException {
|
|
|
|
return InferUndefined.can_throw_ioexception_long();
|
|
|
|
return InferUndefined.can_throw_ioexception_long();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public final float readFloat() throws IOException {
|
|
|
|
public final float readFloat() throws IOException {
|
|
|
|
return InferUndefined.can_throw_ioexception_float();
|
|
|
|
return InferUndefined.can_throw_ioexception_float();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public final double readDouble() throws IOException {
|
|
|
|
public final double readDouble() throws IOException {
|
|
|
|
return InferUndefined.can_throw_ioexception_double();
|
|
|
|
return InferUndefined.can_throw_ioexception_double();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public final String readLine() throws IOException {
|
|
|
|
public final String readLine() throws IOException {
|
|
|
|
return InferUndefined.can_throw_ioexception_string();
|
|
|
|
return InferUndefined.can_throw_ioexception_string();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public final String readUTF() throws IOException {
|
|
|
|
public final String readUTF() throws IOException {
|
|
|
|
return InferUndefined.can_throw_ioexception_string();
|
|
|
|
return InferUndefined.can_throw_ioexception_string();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public final void writeBoolean(boolean v) throws IOException {
|
|
|
|
public final void writeBoolean(boolean v) throws IOException {
|
|
|
|
InferUndefined.can_throw_ioexception_void();
|
|
|
|
InferUndefined.can_throw_ioexception_void();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public final void writeByte(int v) throws IOException {
|
|
|
|
public final void writeByte(int v) throws IOException {
|
|
|
|
InferUndefined.can_throw_ioexception_void();
|
|
|
|
InferUndefined.can_throw_ioexception_void();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public final void writeShort(int v) throws IOException {
|
|
|
|
public final void writeShort(int v) throws IOException {
|
|
|
|
InferUndefined.can_throw_ioexception_void();
|
|
|
|
InferUndefined.can_throw_ioexception_void();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public final void writeChar(int v) throws IOException {
|
|
|
|
public final void writeChar(int v) throws IOException {
|
|
|
|
InferUndefined.can_throw_ioexception_void();
|
|
|
|
InferUndefined.can_throw_ioexception_void();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public final void writeInt(int v) throws IOException {
|
|
|
|
public final void writeInt(int v) throws IOException {
|
|
|
|
InferUndefined.can_throw_ioexception_void();
|
|
|
|
InferUndefined.can_throw_ioexception_void();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public final void writeLong(long v) throws IOException {
|
|
|
|
public final void writeLong(long v) throws IOException {
|
|
|
|
InferUndefined.can_throw_ioexception_void();
|
|
|
|
InferUndefined.can_throw_ioexception_void();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public final void writeFloat(float v) throws IOException {
|
|
|
|
public final void writeFloat(float v) throws IOException {
|
|
|
|
InferUndefined.can_throw_ioexception_void();
|
|
|
|
InferUndefined.can_throw_ioexception_void();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public final void writeDouble(double v) throws IOException {
|
|
|
|
public final void writeDouble(double v) throws IOException {
|
|
|
|
InferUndefined.can_throw_ioexception_void();
|
|
|
|
InferUndefined.can_throw_ioexception_void();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public final void writeBytes(String s) throws IOException {
|
|
|
|
public final void writeBytes(String s) throws IOException {
|
|
|
|
InferUndefined.can_throw_ioexception_void();
|
|
|
|
InferUndefined.can_throw_ioexception_void();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public final void writeChars(String s) throws IOException {
|
|
|
|
public final void writeChars(String s) throws IOException {
|
|
|
|
InferUndefined.can_throw_ioexception_void();
|
|
|
|
InferUndefined.can_throw_ioexception_void();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public final void writeUTF(String str) throws IOException {
|
|
|
|
public final void writeUTF(String str) throws IOException {
|
|
|
|
InferUndefined.can_throw_ioexception_void();
|
|
|
|
InferUndefined.can_throw_ioexception_void();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|