public class RecoverableRandomAccessFile extends Object implements DataOutput, DataInput, Closeable
Constructor and Description |
---|
RecoverableRandomAccessFile(File file,
String mode) |
RecoverableRandomAccessFile(File file,
String mode,
boolean skipMetadataUpdate) |
RecoverableRandomAccessFile(String name,
String mode) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
FileChannel |
getChannel() |
FileDescriptor |
getFD() |
RandomAccessFile |
getRaf() |
protected void |
handleException() |
long |
length() |
int |
read(byte[] b) |
int |
read(byte[] b,
int off,
int len) |
boolean |
readBoolean() |
byte |
readByte() |
char |
readChar() |
double |
readDouble() |
float |
readFloat() |
void |
readFully(byte[] bytes) |
void |
readFully(byte[] bytes,
int i,
int i2) |
int |
readInt() |
String |
readLine() |
long |
readLong() |
short |
readShort() |
int |
readUnsignedByte() |
int |
readUnsignedShort() |
String |
readUTF() |
void |
seek(long pos) |
void |
setLength(long length) |
int |
skipBytes(int i) |
void |
sync() |
void |
write(byte[] bytes) |
void |
write(byte[] bytes,
int i,
int i2) |
void |
write(int i) |
void |
writeBoolean(boolean b) |
void |
writeByte(int i) |
void |
writeBytes(String s) |
void |
writeChar(int i) |
void |
writeChars(String s) |
void |
writeDouble(double v) |
void |
writeFloat(float v) |
void |
writeInt(int i) |
void |
writeLong(long l) |
void |
writeShort(int i) |
void |
writeUTF(String s) |
public RecoverableRandomAccessFile(File file, String mode, boolean skipMetadataUpdate) throws FileNotFoundException
FileNotFoundException
public RecoverableRandomAccessFile(File file, String mode) throws FileNotFoundException
FileNotFoundException
public RecoverableRandomAccessFile(String name, String mode) throws FileNotFoundException
FileNotFoundException
public RandomAccessFile getRaf() throws IOException
IOException
protected void handleException() throws IOException
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public void readFully(byte[] bytes) throws IOException
readFully
in interface DataInput
IOException
public void readFully(byte[] bytes, int i, int i2) throws IOException
readFully
in interface DataInput
IOException
public int skipBytes(int i) throws IOException
skipBytes
in interface DataInput
IOException
public boolean readBoolean() throws IOException
readBoolean
in interface DataInput
IOException
public byte readByte() throws IOException
readByte
in interface DataInput
IOException
public int readUnsignedByte() throws IOException
readUnsignedByte
in interface DataInput
IOException
public short readShort() throws IOException
readShort
in interface DataInput
IOException
public int readUnsignedShort() throws IOException
readUnsignedShort
in interface DataInput
IOException
public char readChar() throws IOException
readChar
in interface DataInput
IOException
public int readInt() throws IOException
readInt
in interface DataInput
IOException
public long readLong() throws IOException
readLong
in interface DataInput
IOException
public float readFloat() throws IOException
readFloat
in interface DataInput
IOException
public double readDouble() throws IOException
readDouble
in interface DataInput
IOException
public String readLine() throws IOException
readLine
in interface DataInput
IOException
public String readUTF() throws IOException
readUTF
in interface DataInput
IOException
public void write(int i) throws IOException
write
in interface DataOutput
IOException
public void write(byte[] bytes) throws IOException
write
in interface DataOutput
IOException
public void write(byte[] bytes, int i, int i2) throws IOException
write
in interface DataOutput
IOException
public void writeBoolean(boolean b) throws IOException
writeBoolean
in interface DataOutput
IOException
public void writeByte(int i) throws IOException
writeByte
in interface DataOutput
IOException
public void writeShort(int i) throws IOException
writeShort
in interface DataOutput
IOException
public void writeChar(int i) throws IOException
writeChar
in interface DataOutput
IOException
public void writeInt(int i) throws IOException
writeInt
in interface DataOutput
IOException
public void writeLong(long l) throws IOException
writeLong
in interface DataOutput
IOException
public void writeFloat(float v) throws IOException
writeFloat
in interface DataOutput
IOException
public void writeDouble(double v) throws IOException
writeDouble
in interface DataOutput
IOException
public void writeBytes(String s) throws IOException
writeBytes
in interface DataOutput
IOException
public void writeChars(String s) throws IOException
writeChars
in interface DataOutput
IOException
public void writeUTF(String s) throws IOException
writeUTF
in interface DataOutput
IOException
public long length() throws IOException
IOException
public void setLength(long length) throws IOException
IOException
public void seek(long pos) throws IOException
IOException
public FileDescriptor getFD() throws IOException
IOException
public void sync() throws IOException
IOException
public FileChannel getChannel() throws IOException
IOException
public int read(byte[] b, int off, int len) throws IOException
IOException
public int read(byte[] b) throws IOException
IOException
Copyright © 2005–2017. All rights reserved.