|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sentilla.platform.cmote.RemoteRandomAccessFile
public class RemoteRandomAccessFile
Private: for Sentilla internal use only.
Abstraction for accessing a remote property.
Notes: Because the property is remote, we don't really know how big it is or what it contains. Reads and writes are propagated as atomic transactions on the remote file and may succeed or fail depending on remote conditions. There is no coherency guarantee and in fact applications should assume that it is their responsibility to guard against RAW and WAR hazards. OperationTimedOutException is thrown whenever an RPC fails to return.
Constructor Summary | |
---|---|
RemoteRandomAccessFile(Addressable target,
String key)
|
|
RemoteRandomAccessFile(Addressable target,
String key,
int maxlength)
|
Method Summary | |
---|---|
void |
close()
Close the underlying media. |
void |
flush()
Ensure that all previous writes have been committed. |
int |
getOffset()
Get the seek position in the media. |
int |
length()
Get length of the media. |
byte |
read()
|
int |
read(byte[] b)
|
int |
read(byte[] b,
int boffset,
int length)
|
boolean |
readBoolean()
|
byte |
readByte()
|
char |
readChar()
|
double |
readDouble()
|
float |
readFloat()
|
int |
readInt()
|
long |
readLong()
|
Object |
readObject()
Read an Object. |
short |
readShort()
|
int |
readUnsignedByte()
|
String |
readUTF()
|
void |
seek(int offset)
Set the seek position in the media. |
void |
skip(int n)
|
void |
write(byte[] b)
Write an array of bytes. |
void |
write(byte[] b,
int boffset,
int length)
Write a series of bytes. |
void |
write(int b)
Write a single byte. |
void |
writeBoolean(boolean a)
|
void |
writeByte(int a)
|
void |
writeChar(int a)
|
void |
writeDouble(double a)
|
void |
writeFloat(float a)
|
void |
writeInt(int a)
|
void |
writeLong(long a)
|
void |
writeObject(Object obj)
Write an object as data. |
void |
writeShort(int a)
|
void |
writeUTF(String s)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RemoteRandomAccessFile(Addressable target, String key, int maxlength)
public RemoteRandomAccessFile(Addressable target, String key)
Method Detail |
---|
public int getOffset()
DataRandomAccess
getOffset
in interface DataRandomAccess
public void writeObject(Object obj)
ObjectOutput
writeObject
in interface ObjectOutput
obj
- Object to write must implement java.io.Serializablepublic Object readObject()
ObjectInput
readObject
in interface ObjectInput
public int read(byte[] b, int boffset, int length)
read
in interface Input
public void write(byte[] b, int boffset, int length)
Output
write
in interface Output
boffset
- within b defining start of series.length
- number of bytes to write.public void skip(int n)
skip
in interface Input
public void seek(int offset)
DataRandomAccess
seek
in interface DataRandomAccess
offset
- byte index to seek to.public int length()
DataRandomAccess
length
in interface DataRandomAccess
public boolean readBoolean() throws IORuntimeException
readBoolean
in interface DataInput
IORuntimeException
public byte readByte() throws IORuntimeException
readByte
in interface DataInput
IORuntimeException
public int readUnsignedByte() throws IORuntimeException
readUnsignedByte
in interface DataInput
IORuntimeException
public short readShort() throws IORuntimeException
readShort
in interface DataInput
IORuntimeException
public char readChar() throws IORuntimeException
readChar
in interface DataInput
IORuntimeException
public int readInt() throws IORuntimeException
readInt
in interface DataInput
IORuntimeException
public long readLong() throws IORuntimeException
readLong
in interface DataInput
IORuntimeException
public float readFloat() throws IORuntimeException
readFloat
in interface DataInput
IORuntimeException
public double readDouble() throws IORuntimeException
readDouble
in interface DataInput
IORuntimeException
public String readUTF() throws IORuntimeException
readUTF
in interface DataInput
IORuntimeException
public void writeBoolean(boolean a) throws IORuntimeException
writeBoolean
in interface DataOutput
IORuntimeException
public void writeByte(int a) throws IORuntimeException
writeByte
in interface DataOutput
IORuntimeException
public void writeShort(int a) throws IORuntimeException
writeShort
in interface DataOutput
IORuntimeException
public void writeChar(int a) throws IORuntimeException
writeChar
in interface DataOutput
IORuntimeException
public void writeInt(int a) throws IORuntimeException
writeInt
in interface DataOutput
IORuntimeException
public void writeLong(long a) throws IORuntimeException
writeLong
in interface DataOutput
IORuntimeException
public void writeFloat(float a) throws IORuntimeException
writeFloat
in interface DataOutput
IORuntimeException
public void writeDouble(double a) throws IORuntimeException
writeDouble
in interface DataOutput
IORuntimeException
public void writeUTF(String s) throws IORuntimeException
writeUTF
in interface DataOutput
IORuntimeException
public byte read() throws IORuntimeException
read
in interface Input
IORuntimeException
public int read(byte[] b) throws IORuntimeException
read
in interface Input
IORuntimeException
public void close() throws IORuntimeException
Output
close
in interface Input
close
in interface Output
IORuntimeException
public void write(int b) throws IORuntimeException
Output
write
in interface Output
IORuntimeException
public void write(byte[] b) throws IORuntimeException
Output
write
in interface Output
IORuntimeException
public void flush() throws IORuntimeException
Output
flush
in interface Output
IORuntimeException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |