|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.metanotion.io.JRandomAccess
public final class JRandomAccess
Adapter to convert a java.io.RandomAccessFile nto a net.metantion.io.RandomAccess.
| Constructor Summary | |
|---|---|
JRandomAccess(RandomAccessFile raf)
|
|
| 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)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JRandomAccess(RandomAccessFile raf)
| Method Detail |
|---|
public long getFilePointer()
getFilePointer in interface RandomAccesspublic void seek(long pos)
seek in interface RandomAccesspublic long length()
length in interface OutputStreamlength in interface RandomAccesspublic long setLength(long newLength)
setLength in interface OutputStreamsetLength in interface RandomAccesspublic void close()
close in interface Closeableclose in interface InputStreamclose in interface OutputStreamclose in interface RandomAccesspublic void flush()
flush in interface Flushableflush in interface OutputStreamflush in interface RandomAccesspublic int read(byte[] b)
read in interface InputStreamread in interface RandomAccess
public int read(byte[] b,
int offset,
int length)
read in interface InputStreamread in interface RandomAccesspublic byte read()
InputStream
read in interface InputStreamread in interface RandomAccesspublic boolean atEOF()
atEOF in interface InputStreamatEOF in interface RandomAccesspublic long skip(long n)
skip in interface InputStreamskip in interface RandomAccesspublic void write(byte[] b)
write in interface OutputStreamwrite in interface RandomAccess
public void write(byte[] b,
int offset,
int length)
write in interface OutputStreamwrite in interface RandomAccesspublic void write(byte b)
write in interface OutputStreamwrite in interface RandomAccesspublic boolean supportsAtomicAppend()
RandomAccess
supportsAtomicAppend in interface RandomAccesspublic long append(byte[] b)
RandomAccess
append in interface RandomAccess
public int readAtOffset(byte[] b,
long filePointer)
readAtOffset in interface RandomAccess
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||