jdk/src/share/classes/javax/management/MBeanFeatureInfo.java
changeset 21656 d4c777ccb1db
parent 20174 360791181f66
child 23010 6dadb192ad81
equal deleted inserted replaced
21655:55f32ae4f920 21656:d4c777ccb1db
   160 
   160 
   161     /**
   161     /**
   162      * Serializes an {@link MBeanFeatureInfo} to an {@link ObjectOutputStream}.
   162      * Serializes an {@link MBeanFeatureInfo} to an {@link ObjectOutputStream}.
   163      * @serialData
   163      * @serialData
   164      * For compatibility reasons, an object of this class is serialized as follows.
   164      * For compatibility reasons, an object of this class is serialized as follows.
   165      * <ul>
   165      * <p>
   166      * The method {@link ObjectOutputStream#defaultWriteObject defaultWriteObject()}
   166      * The method {@link ObjectOutputStream#defaultWriteObject defaultWriteObject()}
   167      * is called first to serialize the object except the field {@code descriptor}
   167      * is called first to serialize the object except the field {@code descriptor}
   168      * which is declared as transient. The field {@code descriptor} is serialized
   168      * which is declared as transient. The field {@code descriptor} is serialized
   169      * as follows:
   169      * as follows:
   170      *     <ul>
   170      *     <ul>
   178      *     <li>Otherwise, the method {@link ObjectOutputStream#write write(int val)}
   178      *     <li>Otherwise, the method {@link ObjectOutputStream#write write(int val)}
   179      * is called to write a byte with the value {@code 0}, then the method
   179      * is called to write a byte with the value {@code 0}, then the method
   180      * {@link ObjectOutputStream#writeObject writeObject(Object obj)} is called
   180      * {@link ObjectOutputStream#writeObject writeObject(Object obj)} is called
   181      * to serialize directly the field {@code descriptor}.
   181      * to serialize directly the field {@code descriptor}.
   182      *     </ul>
   182      *     </ul>
   183      * </ul>
   183      *
   184      * @since 1.6
   184      * @since 1.6
   185      */
   185      */
   186     private void writeObject(ObjectOutputStream out) throws IOException {
   186     private void writeObject(ObjectOutputStream out) throws IOException {
   187         out.defaultWriteObject();
   187         out.defaultWriteObject();
   188 
   188 
   204 
   204 
   205     /**
   205     /**
   206      * Deserializes an {@link MBeanFeatureInfo} from an {@link ObjectInputStream}.
   206      * Deserializes an {@link MBeanFeatureInfo} from an {@link ObjectInputStream}.
   207      * @serialData
   207      * @serialData
   208      * For compatibility reasons, an object of this class is deserialized as follows.
   208      * For compatibility reasons, an object of this class is deserialized as follows.
   209      * <ul>
   209      * <p>
   210      * The method {@link ObjectInputStream#defaultReadObject defaultReadObject()}
   210      * The method {@link ObjectInputStream#defaultReadObject defaultReadObject()}
   211      * is called first to deserialize the object except the field
   211      * is called first to deserialize the object except the field
   212      * {@code descriptor}, which is not serialized in the default way. Then the method
   212      * {@code descriptor}, which is not serialized in the default way. Then the method
   213      * {@link ObjectInputStream#read read()} is called to read a byte, the field
   213      * {@link ObjectInputStream#read read()} is called to read a byte, the field
   214      * {@code descriptor} is deserialized according to the value of the byte value:
   214      * {@code descriptor} is deserialized according to the value of the byte value:
   226      *    <li>-1. This means that there is no byte to read and that the object is from
   226      *    <li>-1. This means that there is no byte to read and that the object is from
   227      *       an earlier version of the JMX API. The field {@code descriptor} is set
   227      *       an earlier version of the JMX API. The field {@code descriptor} is set
   228      *       to {@link ImmutableDescriptor#EMPTY_DESCRIPTOR EMPTY_DESCRIPTOR}</li>
   228      *       to {@link ImmutableDescriptor#EMPTY_DESCRIPTOR EMPTY_DESCRIPTOR}</li>
   229      *    <li>Any other value. A {@link StreamCorruptedException} is thrown.</li>
   229      *    <li>Any other value. A {@link StreamCorruptedException} is thrown.</li>
   230      *    </ul>
   230      *    </ul>
   231      * </ul>
   231      *
   232      * @since 1.6
   232      * @since 1.6
   233      */
   233      */
   234     private void readObject(ObjectInputStream in)
   234     private void readObject(ObjectInputStream in)
   235         throws IOException, ClassNotFoundException {
   235         throws IOException, ClassNotFoundException {
   236 
   236