/** * The method is used to read the data from a DataInput object. The fields of the object are * assigned values from the inout stream. * * @param is The input stream from which the data is to be read * @param versionNo * @exception java.io.IOException If there is some error reading data from the stream */ public void fromStream(java.io.DataInput is, int versionNo) throws java.io.IOException { m_header = new ServiceReference(); m_header.fromStream(is, versionNo); int size = is.readInt(); for (int i = 0; i < size; ++i) { ServiceInstanceInfo info = new ServiceInstanceInfo(); info.fromStream(is, versionNo); m_vecRunningInstances.add(info); } }
/** * The method writes out the values of the fields of the object to the output stream. * * @param out The output stream to which the data is to be written * @param versionNo * @exception java.io.IOException If there is some error in writing the data onto the output * stream. */ public void toStream(java.io.DataOutput out, int versionNo) throws java.io.IOException { m_header.toStream(out, versionNo); out.writeInt(m_vecRunningInstances.size()); Enumeration elements = m_vecRunningInstances.elements(); while (elements.hasMoreElements()) { ServiceInstanceInfo info = (ServiceInstanceInfo) elements.nextElement(); info.toStream(out, versionNo); } }