Hitachi

JP1 Version 12 JP1/Navigation Platform Development Guide


6.4.1 serialize method

This method is used to serialize suspend information in Suspend/Resume Plugins. It serializes the suspend information (suspendInfo) specified by the parameter to XML format, and then writes the results into the output stream out. This method does not close the output stream out. The invocation side is responsible for performing the close processing.

If an attempt to serialize the suspend information or output the information to the stream fails, the method throws the UCNPPluginException exception. A Navigation Platform message ID is added to the detailed message for the UCNPPluginException exception thrown by this method. You need to handle the thrown exception and then throw the UCNPPluginException exception for which the message to be displayed in the dialog box is set.

Organization of this subsection

(1) Format

public static void serialize(ISuspendInfo suspendInfo, OutputStream out) 
                   throws UCNPPluginException;

(2) Arguments

(a) suspendInfo

This argument stores suspend information.

(b) out

This argument stores the output stream to which the serialized suspend information is written.

(3) Return values

None

(4) Exception

UCNPPluginException - An attempt to serialize and output suspend information fails.

If an error occurs with this method, serialization processing is interrupted and the UCNPPluginException exception is thrown. The following shows a list of errors.

Table 6‒3: List of errors that occur in the serialize method

Error

Message ID

Null is specified for the suspendInfo parameter.

KDCZ10083-E

Null is specified for the out parameter.

KDCZ10083-E

An invalid object (an object not created by Navigation Platform) is specified for the suspendInfo parameter.

KDCZ10084-E

It was not possible to write information to the output stream specified by the parameter due to a problem with access permissions or disk space.

KDCZ10085-E