Class horb.orb.FileIOCI
All Packages Class Hierarchy This Package Previous Next Index
Class horb.orb.FileIOCI
java.lang.Object
|
+----horb.orb.IOCICommon
|
+----horb.orb.FileIOCI
- public final class FileIOCI
- extends IOCICommon
- implements IOCI
Persistent objects support class. By using this class, you can
save and restore objects to/from files. Typical usage is;
to save:
FileIOCI file = new FileIOCI("foo.fof");
file.save(object);
to restore:
FileIOCI file = new FileIOCI("foo.fof");
Object object = file.load();
A file saved by FileIOCI is called a foffile, meaning freezed object
file. You can get info of a foffile
by 'fofrun -info foo.fof' command.
If a saved object implements the Restartable interface, the
object can be executed by the fofrun command. See Restartable
for more detail. See examples/foffile for an example.
Callable methods in this class are, save(), load(), getFofInfo(),
getMajorVersion(), getMinorVersion(), setProperty(), getProperty(),
and getLocalHostName().
- See Also:
-
-
is
-
-
major_version
-
-
minor_version
-
-
os
-
-
signature
- 0x4830 is the signature of FileIOCI.
-
FileIOCI()
-
-
FileIOCI(File)
- create FileIOCI for the File.
-
FileIOCI(HorbURL)
- create FileIOCI for the URL.
-
FileIOCI(String)
- create FileIOCI for the filename.
-
available()
- return number of bytes available without blocking.
-
connectServer(String, int)
- don't call this directly.
-
finalize()
- don't call this directly.
-
getAddress()
- don't call this directly.
-
getFofInfo()
- return information of the fof file.
-
getHostName()
- don't call this directly.
-
getLocalAddress()
- don't call this directly.
-
getLocalHostName()
- returns current local hostname
-
getMajorVersion()
- returns major version of this implementation.
-
getMinorVersion()
- returns minor version of this implementation.
-
getProperty(int, Object)
- get property of FileIOCI.
-
getSignature()
-
-
isConnected()
- don't call this directly.
-
kick()
- don't call this directly.
-
load()
- load object.
-
recvBoolean()
- don't call this directly.
-
recvBooleanArray()
- don't call this directly.
-
recvByte()
- don't call this directly.
-
recvByteArray()
- don't call this directly.
-
recvChar()
- don't call this directly.
-
recvCharArray()
- don't call this directly.
-
recvConnectServer()
- don't cll this directly.
-
recvDouble()
- don't call this directly.
-
recvDoubleArray()
- don't call this directly.
-
recvFloat()
- don't call this directly.
-
recvFloatArray()
- don't call this directly.
-
recvInt()
- don't call this directly.
-
recvIntArray()
- don't call this directly.
-
recvLong()
- don't call this directly.
-
recvLongArray()
- don't call this directly.
-
recvObject(String, Goldberg)
-
-
recvShort()
- don't call this directly.
-
recvShortArray()
- don't call this directly.
-
recvString()
- don't call this directly.
-
recvStringArray()
- don't call this directly.
-
release()
- release connection.
-
save(Object)
- save object.
-
sendBoolean(boolean)
- don't call this directly.
-
sendBooleanArray(boolean[])
- don't call this directly.
-
sendByte(byte)
- don't call this directly.
-
sendByteArray(byte[])
- don't call this directly.
-
sendChar(char)
- don't call this directly.
-
sendCharArray(char[])
- don't call this directly.
-
sendDouble(double)
- don't call this directly.
-
sendDoubleArray(double[])
- don't call this directly.
-
sendFloat(float)
- don't call this directly.
-
sendFloatArray(float[])
- don't call this directly.
-
sendInt(int)
- don't call this directly.
-
sendIntArray(int[])
- don't call this directly.
-
sendIOCISignature()
- don't call this directly.
-
sendLong(long)
- don't call this directly.
-
sendLongArray(long[])
- don't call this directly.
-
sendObject(Object, String, Loopy)
-
-
sendShort(short)
- don't call this directly.
-
sendShortArray(short[])
- don't call this directly.
-
sendString(String)
- don't call this directly.
-
sendStringArray(String[])
- don't call this directly.
-
serverAccept(int)
- don't call this directly.
-
serverInit(int)
- don't call this directly.
-
setProperty(int, Object)
- set property of FileIOCI.
major_version
public final static short major_version
minor_version
public final static short minor_version
signature
public final static short signature
- 0x4830 is the signature of FileIOCI. Use another signature if you write
another IOCI.
os
public DataOutputStream os
is
public DataInputStream is
FileIOCI
public FileIOCI()
FileIOCI
public FileIOCI(HorbURL url) throws HORBException
- create FileIOCI for the URL.
- Parameters:
- url - this must be like "file:///filename". If it contains
directory, the directory should exists.
FileIOCI
public FileIOCI(File file) throws HORBException
- create FileIOCI for the File.
- Parameters:
- file - File object of the target file.
FileIOCI
public FileIOCI(String filename) throws HORBException
- create FileIOCI for the filename.
- Parameters:
- filename - a platform dependent local filename. If it contains
directory, the directory should exists.
save
public void save(Object o) throws HORBException, IOException
- save object. This saves all reachable object from the object into
the file.
- Parameters:
- o - object to be saved.
load
public Object load() throws HORBException, IOException
- load object. The object should be saved by the save() method.
- Returns:
- loaded object.
getFofInfo
public FofInfo getFofInfo() throws HORBException, IOException
- return information of the fof file.
getSignature
public short getSignature()
getMajorVersion
public short getMajorVersion()
- returns major version of this implementation. If this number
differs from a foffile's major version number, this FileIOCI
couldn't read the foffile.
getMinorVersion
public short getMinorVersion()
- returns minor version of this implementation.
setProperty
public void setProperty(int request,
Object obj)
- set property of FileIOCI. Currently the common property
requests listed in IOCIService are supported.
- Overrides:
- setProperty in class IOCICommon
getProperty
public Object getProperty(int request,
Object obj)
- get property of FileIOCI. Currently the common property
requests listed in IOCIService are supported.
- Overrides:
- getProperty in class IOCICommon
getLocalHostName
public String getLocalHostName() throws IOException
- returns current local hostname
finalize
public void finalize()
- don't call this directly.
- Overrides:
- finalize in class Object
available
public int available() throws IOException
- return number of bytes available without blocking.
release
public void release()
- release connection. You don't need to call this.
- Overrides:
- release in class IOCICommon
kick
public final void kick() throws IOException
- don't call this directly.
- Overrides:
- kick in class IOCICommon
sendObject
public void sendObject(Object o,
String expectedClassName,
Loopy loopy) throws HORBException, IOException, ProxyException
recvObject
public Object recvObject(String expectedClassName,
Goldberg gb) throws HORBException, IOException, ProxyException
sendBoolean
public final void sendBoolean(boolean value) throws IOException
- don't call this directly.
sendBooleanArray
public final void sendBooleanArray(boolean value[]) throws IOException
- don't call this directly.
sendByte
public final void sendByte(byte value) throws IOException
- don't call this directly.
- Overrides:
- sendByte in class IOCICommon
sendByteArray
public final void sendByteArray(byte value[]) throws IOException
- don't call this directly.
sendChar
public final void sendChar(char value) throws IOException
- don't call this directly.
sendCharArray
public final void sendCharArray(char value[]) throws IOException
- don't call this directly.
sendShort
public final void sendShort(short value) throws IOException
- don't call this directly.
- Overrides:
- sendShort in class IOCICommon
sendShortArray
public final void sendShortArray(short value[]) throws IOException
- don't call this directly.
sendInt
public final void sendInt(int value) throws IOException
- don't call this directly.
- Overrides:
- sendInt in class IOCICommon
sendIntArray
public final void sendIntArray(int value[]) throws IOException
- don't call this directly.
sendLong
public final void sendLong(long value) throws IOException
- don't call this directly.
sendLongArray
public final void sendLongArray(long value[]) throws IOException
- don't call this directly.
sendFloat
public final void sendFloat(float value) throws IOException
- don't call this directly.
sendFloatArray
public final void sendFloatArray(float value[]) throws IOException
- don't call this directly.
sendDouble
public final void sendDouble(double value) throws IOException
- don't call this directly.
sendDoubleArray
public final void sendDoubleArray(double value[]) throws IOException
- don't call this directly.
sendString
public final void sendString(String value) throws IOException
- don't call this directly.
- Overrides:
- sendString in class IOCICommon
sendStringArray
public final void sendStringArray(String value[]) throws IOException
- don't call this directly.
recvBoolean
public final boolean recvBoolean() throws IOException
- don't call this directly.
recvBooleanArray
public final boolean[] recvBooleanArray() throws IOException
- don't call this directly.
recvByte
public final byte recvByte() throws IOException
- don't call this directly.
- Overrides:
- recvByte in class IOCICommon
recvByteArray
public final byte[] recvByteArray() throws IOException
- don't call this directly.
recvChar
public final char recvChar() throws IOException
- don't call this directly.
recvCharArray
public final char[] recvCharArray() throws IOException
- don't call this directly.
recvShort
public final short recvShort() throws IOException
- don't call this directly.
- Overrides:
- recvShort in class IOCICommon
recvShortArray
public final short[] recvShortArray() throws IOException
- don't call this directly.
recvInt
public final int recvInt() throws IOException
- don't call this directly.
- Overrides:
- recvInt in class IOCICommon
recvIntArray
public final int[] recvIntArray() throws IOException
- don't call this directly.
recvLong
public final long recvLong() throws IOException
- don't call this directly.
recvLongArray
public final long[] recvLongArray() throws IOException
- don't call this directly.
recvFloat
public final float recvFloat() throws IOException
- don't call this directly.
recvFloatArray
public final float[] recvFloatArray() throws IOException
- don't call this directly.
recvDouble
public final double recvDouble() throws IOException
- don't call this directly.
recvDoubleArray
public final double[] recvDoubleArray() throws IOException
- don't call this directly.
recvString
public final String recvString() throws IOException
- don't call this directly.
- Overrides:
- recvString in class IOCICommon
recvStringArray
public final String[] recvStringArray() throws IOException
- don't call this directly.
isConnected
public synchronized boolean isConnected()
- don't call this directly.
- Overrides:
- isConnected in class IOCICommon
serverInit
public void serverInit(int port) throws IOException
- don't call this directly.
serverAccept
public IOCI serverAccept(int port) throws IOException
- don't call this directly.
connectServer
public void connectServer(String host,
int port) throws IOException
- don't call this directly.
- Overrides:
- connectServer in class IOCICommon
sendIOCISignature
public void sendIOCISignature() throws IOException
- don't call this directly.
- Overrides:
- sendIOCISignature in class IOCICommon
recvConnectServer
public boolean recvConnectServer() throws IOException
- don't cll this directly.
getLocalAddress
public byte[] getLocalAddress() throws IOException
- don't call this directly.
getHostName
public String getHostName()
- don't call this directly.
getAddress
public byte[] getAddress()
- don't call this directly.
All Packages Class Hierarchy This Package Previous Next Index