Package net.metanotion.io
Interface RandomAccessInterface
-
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Implementing Classes:
RAIFile
public interface RandomAccessInterface extends Closeable
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancanWrite()I2P is the file writable? Only valid if the File constructor was used, not the RAF constructorvoidclose()longgetFilePointer()longlength()intread()intread(byte[] b)intread(byte[] b, int off, int len)booleanreadBoolean()bytereadByte()charreadChar()doublereadDouble()floatreadFloat()voidreadFully(byte[] b)voidreadFully(byte[] b, int off, int len)intreadInt()StringreadLine()longreadLong()shortreadShort()intreadUnsignedByte()intreadUnsignedInt()intreadUnsignedShort()StringreadUTF()voidseek(long pos)voidsetLength(long newLength)intskipBytes(int n)voidwrite(byte[] b)voidwrite(byte[] b, int off, int len)voidwrite(int b)voidwriteBoolean(boolean v)voidwriteByte(int v)voidwriteBytes(String s)voidwriteChar(int v)voidwriteChars(String s)voidwriteDouble(double v)voidwriteFloat(float v)voidwriteInt(int v)voidwriteLong(long v)voidwriteShort(int v)voidwriteUTF(String str)
-
-
-
Method Detail
-
getFilePointer
long getFilePointer() throws IOException- Throws:
IOException
-
length
long length() throws IOException- Throws:
IOException
-
read
int read() throws IOException
- Throws:
IOException
-
read
int read(byte[] b) throws IOException
- Throws:
IOException
-
read
int read(byte[] b, int off, int len) throws IOException- Throws:
IOException
-
seek
void seek(long pos) throws IOException
- Throws:
IOException
-
setLength
void setLength(long newLength) throws IOException- Throws:
IOException
-
canWrite
boolean canWrite()
I2P is the file writable? Only valid if the File constructor was used, not the RAF constructor- Since:
- 0.8.8
-
close
void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
readBoolean
boolean readBoolean() throws IOException- Throws:
IOException
-
readByte
byte readByte() throws IOException- Throws:
IOException
-
readChar
char readChar() throws IOException- Throws:
IOException
-
readDouble
double readDouble() throws IOException- Throws:
IOException
-
readFloat
float readFloat() throws IOException- Throws:
IOException
-
readFully
void readFully(byte[] b) throws IOException- Throws:
IOException
-
readFully
void readFully(byte[] b, int off, int len) throws IOException- Throws:
IOException
-
readInt
int readInt() throws IOException- Throws:
IOException
-
readLine
String readLine() throws IOException
- Throws:
IOException
-
readLong
long readLong() throws IOException- Throws:
IOException
-
readShort
short readShort() throws IOException- Throws:
IOException
-
readUnsignedByte
int readUnsignedByte() throws IOException- Throws:
IOException
-
readUnsignedShort
int readUnsignedShort() throws IOException- Throws:
IOException
-
readUnsignedInt
int readUnsignedInt() throws IOException- Throws:
IOException
-
readUTF
String readUTF() throws IOException
- Throws:
IOException
-
skipBytes
int skipBytes(int n) throws IOException- Throws:
IOException
-
write
void write(int b) throws IOException- Throws:
IOException
-
write
void write(byte[] b) throws IOException- Throws:
IOException
-
write
void write(byte[] b, int off, int len) throws IOException- Throws:
IOException
-
writeBoolean
void writeBoolean(boolean v) throws IOException- Throws:
IOException
-
writeByte
void writeByte(int v) throws IOException- Throws:
IOException
-
writeShort
void writeShort(int v) throws IOException- Throws:
IOException
-
writeChar
void writeChar(int v) throws IOException- Throws:
IOException
-
writeInt
void writeInt(int v) throws IOException- Throws:
IOException
-
writeLong
void writeLong(long v) throws IOException- Throws:
IOException
-
writeFloat
void writeFloat(float v) throws IOException- Throws:
IOException
-
writeDouble
void writeDouble(double v) throws IOException- Throws:
IOException
-
writeBytes
void writeBytes(String s) throws IOException
- Throws:
IOException
-
writeChars
void writeChars(String s) throws IOException
- Throws:
IOException
-
writeUTF
void writeUTF(String str) throws IOException
- Throws:
IOException
-
-