public class SimpleRandomAccessFile extends java.lang.Object implements RandomAccessInterface
Constructor and Description |
---|
SimpleRandomAccessFile(java.lang.String fileName,
boolean readOnly) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
boolean |
ensureLength(long newLength) |
long |
getFilePointer() |
boolean |
isReadOnly() |
long |
length() |
int |
read() |
void |
read(byte[] b,
int offset,
int length) |
int |
readInt() |
long |
readLong() |
void |
seek(long position) |
boolean |
setLength(long newLength) |
void |
synch() |
void |
write(byte[] b,
int off,
int length) |
void |
writeInt(int i) |
void |
writeLong(long i) |
public SimpleRandomAccessFile(java.lang.String fileName, boolean readOnly) throws java.io.FileNotFoundException, java.io.IOException
java.io.FileNotFoundException
java.io.IOException
public long length() throws java.io.IOException
length
in interface RandomAccessInterface
java.io.IOException
public void seek(long position) throws java.io.IOException
seek
in interface RandomAccessInterface
java.io.IOException
public long getFilePointer() throws java.io.IOException
getFilePointer
in interface RandomAccessInterface
java.io.IOException
public int read() throws java.io.IOException
read
in interface RandomAccessInterface
java.io.IOException
public long readLong() throws java.io.IOException
readLong
in interface RandomAccessInterface
java.io.IOException
public int readInt() throws java.io.IOException
readInt
in interface RandomAccessInterface
java.io.IOException
public void read(byte[] b, int offset, int length) throws java.io.IOException
read
in interface RandomAccessInterface
java.io.IOException
public void write(byte[] b, int off, int length) throws java.io.IOException
write
in interface RandomAccessInterface
java.io.IOException
public void writeInt(int i) throws java.io.IOException
writeInt
in interface RandomAccessInterface
java.io.IOException
public void writeLong(long i) throws java.io.IOException
writeLong
in interface RandomAccessInterface
java.io.IOException
public void close() throws java.io.IOException
close
in interface RandomAccessInterface
java.io.IOException
public boolean isReadOnly()
isReadOnly
in interface RandomAccessInterface
public boolean setLength(long newLength)
setLength
in interface RandomAccessInterface
public void synch()
synch
in interface RandomAccessInterface
public boolean ensureLength(long newLength)
ensureLength
in interface RandomAccessInterface
Copyright © 2015-2024 StreamScape Technologies. All rights reserved.