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 boolean
canWrite()
I2P is the file writable? Only valid if the File constructor was used, not the RAF constructorvoid
close()
long
getFilePointer()
long
length()
int
read()
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[] b)
void
readFully(byte[] b, int off, int len)
int
readInt()
String
readLine()
long
readLong()
short
readShort()
int
readUnsignedByte()
int
readUnsignedInt()
int
readUnsignedShort()
String
readUTF()
void
seek(long pos)
void
setLength(long newLength)
int
skipBytes(int n)
void
write(byte[] b)
void
write(byte[] b, int off, int len)
void
write(int b)
void
writeBoolean(boolean v)
void
writeByte(int v)
void
writeBytes(String s)
void
writeChar(int v)
void
writeChars(String s)
void
writeDouble(double v)
void
writeFloat(float v)
void
writeInt(int v)
void
writeLong(long v)
void
writeShort(int v)
void
writeUTF(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:
close
in interfaceAutoCloseable
- Specified by:
close
in 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
-
-