|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface RandomAccess
An interface for reading and writing a "random access" file. This behaves much like an array of bytes with a cursor(whose position is returned by .length()).
| Method Summary | |
|---|---|
long |
append(byte[] b)
Same as write(byte[] b), except the file pointer is automatically set to the end of the file. |
boolean |
atEOF()
|
void |
close()
|
void |
flush()
|
long |
getFilePointer()
|
long |
length()
|
byte |
read()
Reads the next byte of data from the stream. |
int |
read(byte[] b)
|
int |
read(byte[] b,
int offset,
int length)
|
int |
readAtOffset(byte[] b,
long filePointer)
|
void |
seek(long pos)
|
long |
setLength(long newLength)
|
long |
skip(long n)
|
boolean |
supportsAtomicAppend()
Determine whether this file supports atomic appends. |
void |
write(byte b)
|
void |
write(byte[] b)
|
void |
write(byte[] b,
int offset,
int length)
|
| Method Detail |
|---|
long getFilePointer()
void seek(long pos)
long length()
length in interface OutputStreamlong setLength(long newLength)
setLength in interface OutputStreamvoid close()
close in interface Closeableclose in interface InputStreamclose in interface OutputStreamvoid flush()
flush in interface Flushableflush in interface OutputStreamint read(byte[] b)
read in interface InputStream
int read(byte[] b,
int offset,
int length)
read in interface InputStreambyte read()
InputStream
read in interface InputStreamboolean atEOF()
atEOF in interface InputStreamlong skip(long n)
skip in interface InputStreamvoid write(byte[] b)
write in interface OutputStream
void write(byte[] b,
int offset,
int length)
write in interface OutputStreamvoid write(byte b)
write in interface OutputStreamboolean supportsAtomicAppend()
long append(byte[] b)
int readAtOffset(byte[] b,
long filePointer)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||