Java Code Examples for java.io.SerialCallbackContext#getDesc()

The following examples show how to use java.io.SerialCallbackContext#getDesc() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ObjectOutputStream.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Write the non-static and non-transient fields of the current class to
 * this stream.  This may only be called from the writeObject method of the
 * class being serialized. It will throw the NotActiveException if it is
 * called otherwise.
 *
 * @throws  IOException if I/O errors occur while writing to the underlying
 *          <code>OutputStream</code>
 */
public void defaultWriteObject() throws IOException {
    SerialCallbackContext ctx = curContext;
    if (ctx == null) {
        throw new NotActiveException("not in call to writeObject");
    }
    Object curObj = ctx.getObj();
    ObjectStreamClass curDesc = ctx.getDesc();
    bout.setBlockDataMode(false);
    defaultWriteFields(curObj, curDesc);
    bout.setBlockDataMode(true);
}
 
Example 2
Source File: ObjectOutputStream.java    From jdk-1.7-annotated with Apache License 2.0 5 votes vote down vote up
/**
 * Retrieve the object used to buffer persistent fields to be written to
 * the stream.  The fields will be written to the stream when writeFields
 * method is called.
 *
 * @return  an instance of the class Putfield that holds the serializable
 *          fields
 * @throws  IOException if I/O errors occur
 * @since 1.2
 */
public ObjectOutputStream.PutField putFields() throws IOException {
    if (curPut == null) {
        SerialCallbackContext ctx = curContext;
        if (ctx == null) {
            throw new NotActiveException("not in call to writeObject");
        }
        Object curObj = ctx.getObj();
        ObjectStreamClass curDesc = ctx.getDesc();
        curPut = new PutFieldImpl(curDesc);
    }
    return curPut;
}
 
Example 3
Source File: ObjectOutputStream.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Retrieve the object used to buffer persistent fields to be written to
 * the stream.  The fields will be written to the stream when writeFields
 * method is called.
 *
 * @return  an instance of the class Putfield that holds the serializable
 *          fields
 * @throws  IOException if I/O errors occur
 * @since 1.2
 */
public ObjectOutputStream.PutField putFields() throws IOException {
    if (curPut == null) {
        SerialCallbackContext ctx = curContext;
        if (ctx == null) {
            throw new NotActiveException("not in call to writeObject");
        }
        Object curObj = ctx.getObj();
        ObjectStreamClass curDesc = ctx.getDesc();
        curPut = new PutFieldImpl(curDesc);
    }
    return curPut;
}
 
Example 4
Source File: ObjectOutputStream.java    From Java8CN with Apache License 2.0 5 votes vote down vote up
/**
 * Retrieve the object used to buffer persistent fields to be written to
 * the stream.  The fields will be written to the stream when writeFields
 * method is called.
 *
 * @return  an instance of the class Putfield that holds the serializable
 *          fields
 * @throws  IOException if I/O errors occur
 * @since 1.2
 */
public ObjectOutputStream.PutField putFields() throws IOException {
    if (curPut == null) {
        SerialCallbackContext ctx = curContext;
        if (ctx == null) {
            throw new NotActiveException("not in call to writeObject");
        }
        Object curObj = ctx.getObj();
        ObjectStreamClass curDesc = ctx.getDesc();
        curPut = new PutFieldImpl(curDesc);
    }
    return curPut;
}
 
Example 5
Source File: ObjectOutputStream.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Retrieve the object used to buffer persistent fields to be written to
 * the stream.  The fields will be written to the stream when writeFields
 * method is called.
 *
 * @return  an instance of the class Putfield that holds the serializable
 *          fields
 * @throws  IOException if I/O errors occur
 * @since 1.2
 */
public ObjectOutputStream.PutField putFields() throws IOException {
    if (curPut == null) {
        SerialCallbackContext ctx = curContext;
        if (ctx == null) {
            throw new NotActiveException("not in call to writeObject");
        }
        Object curObj = ctx.getObj();
        ObjectStreamClass curDesc = ctx.getDesc();
        curPut = new PutFieldImpl(curDesc);
    }
    return curPut;
}
 
Example 6
Source File: ObjectOutputStream.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Retrieve the object used to buffer persistent fields to be written to
 * the stream.  The fields will be written to the stream when writeFields
 * method is called.
 *
 * @return  an instance of the class Putfield that holds the serializable
 *          fields
 * @throws  IOException if I/O errors occur
 * @since 1.2
 */
public ObjectOutputStream.PutField putFields() throws IOException {
    if (curPut == null) {
        SerialCallbackContext ctx = curContext;
        if (ctx == null) {
            throw new NotActiveException("not in call to writeObject");
        }
        Object curObj = ctx.getObj();
        ObjectStreamClass curDesc = ctx.getDesc();
        curPut = new PutFieldImpl(curDesc);
    }
    return curPut;
}
 
Example 7
Source File: ObjectOutputStream.java    From jdk-1.7-annotated with Apache License 2.0 5 votes vote down vote up
/**
 * Write the non-static and non-transient fields of the current class to
 * this stream.  This may only be called from the writeObject method of the
 * class being serialized. It will throw the NotActiveException if it is
 * called otherwise.
 *
 * @throws  IOException if I/O errors occur while writing to the underlying
 *          <code>OutputStream</code>
 */
public void defaultWriteObject() throws IOException {
    SerialCallbackContext ctx = curContext;
    if (ctx == null) {
        throw new NotActiveException("not in call to writeObject");
    }
    Object curObj = ctx.getObj();
    ObjectStreamClass curDesc = ctx.getDesc();
    bout.setBlockDataMode(false);
    defaultWriteFields(curObj, curDesc);
    bout.setBlockDataMode(true);
}
 
Example 8
Source File: ObjectOutputStream.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Retrieve the object used to buffer persistent fields to be written to
 * the stream.  The fields will be written to the stream when writeFields
 * method is called.
 *
 * @return  an instance of the class Putfield that holds the serializable
 *          fields
 * @throws  IOException if I/O errors occur
 * @since 1.2
 */
public ObjectOutputStream.PutField putFields() throws IOException {
    if (curPut == null) {
        SerialCallbackContext ctx = curContext;
        if (ctx == null) {
            throw new NotActiveException("not in call to writeObject");
        }
        Object curObj = ctx.getObj();
        ObjectStreamClass curDesc = ctx.getDesc();
        curPut = new PutFieldImpl(curDesc);
    }
    return curPut;
}
 
Example 9
Source File: ObjectOutputStream.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Write the non-static and non-transient fields of the current class to
 * this stream.  This may only be called from the writeObject method of the
 * class being serialized. It will throw the NotActiveException if it is
 * called otherwise.
 *
 * @throws  IOException if I/O errors occur while writing to the underlying
 *          <code>OutputStream</code>
 */
public void defaultWriteObject() throws IOException {
    SerialCallbackContext ctx = curContext;
    if (ctx == null) {
        throw new NotActiveException("not in call to writeObject");
    }
    Object curObj = ctx.getObj();
    ObjectStreamClass curDesc = ctx.getDesc();
    bout.setBlockDataMode(false);
    defaultWriteFields(curObj, curDesc);
    bout.setBlockDataMode(true);
}
 
Example 10
Source File: ObjectOutputStream.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Retrieve the object used to buffer persistent fields to be written to
 * the stream.  The fields will be written to the stream when writeFields
 * method is called.
 *
 * @return  an instance of the class Putfield that holds the serializable
 *          fields
 * @throws  IOException if I/O errors occur
 * @since 1.2
 */
public ObjectOutputStream.PutField putFields() throws IOException {
    if (curPut == null) {
        SerialCallbackContext ctx = curContext;
        if (ctx == null) {
            throw new NotActiveException("not in call to writeObject");
        }
        Object curObj = ctx.getObj();
        ObjectStreamClass curDesc = ctx.getDesc();
        curPut = new PutFieldImpl(curDesc);
    }
    return curPut;
}
 
Example 11
Source File: ObjectOutputStream.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/**
 * Write the non-static and non-transient fields of the current class to
 * this stream.  This may only be called from the writeObject method of the
 * class being serialized. It will throw the NotActiveException if it is
 * called otherwise.
 *
 * @throws  IOException if I/O errors occur while writing to the underlying
 *          <code>OutputStream</code>
 */
public void defaultWriteObject() throws IOException {
    SerialCallbackContext ctx = curContext;
    if (ctx == null) {
        throw new NotActiveException("not in call to writeObject");
    }
    Object curObj = ctx.getObj();
    ObjectStreamClass curDesc = ctx.getDesc();
    bout.setBlockDataMode(false);
    defaultWriteFields(curObj, curDesc);
    bout.setBlockDataMode(true);
}
 
Example 12
Source File: ObjectOutputStream.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/**
 * Retrieve the object used to buffer persistent fields to be written to
 * the stream.  The fields will be written to the stream when writeFields
 * method is called.
 *
 * @return  an instance of the class Putfield that holds the serializable
 *          fields
 * @throws  IOException if I/O errors occur
 * @since 1.2
 */
public ObjectOutputStream.PutField putFields() throws IOException {
    if (curPut == null) {
        SerialCallbackContext ctx = curContext;
        if (ctx == null) {
            throw new NotActiveException("not in call to writeObject");
        }
        Object curObj = ctx.getObj();
        ObjectStreamClass curDesc = ctx.getDesc();
        curPut = new PutFieldImpl(curDesc);
    }
    return curPut;
}
 
Example 13
Source File: ObjectOutputStream.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/**
 * Write the non-static and non-transient fields of the current class to
 * this stream.  This may only be called from the writeObject method of the
 * class being serialized. It will throw the NotActiveException if it is
 * called otherwise.
 *
 * @throws  IOException if I/O errors occur while writing to the underlying
 *          <code>OutputStream</code>
 */
public void defaultWriteObject() throws IOException {
    SerialCallbackContext ctx = curContext;
    if (ctx == null) {
        throw new NotActiveException("not in call to writeObject");
    }
    Object curObj = ctx.getObj();
    ObjectStreamClass curDesc = ctx.getDesc();
    bout.setBlockDataMode(false);
    defaultWriteFields(curObj, curDesc);
    bout.setBlockDataMode(true);
}
 
Example 14
Source File: ObjectOutputStream.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Retrieve the object used to buffer persistent fields to be written to
 * the stream.  The fields will be written to the stream when writeFields
 * method is called.
 *
 * @return  an instance of the class Putfield that holds the serializable
 *          fields
 * @throws  IOException if I/O errors occur
 * @since 1.2
 */
public ObjectOutputStream.PutField putFields() throws IOException {
    if (curPut == null) {
        SerialCallbackContext ctx = curContext;
        if (ctx == null) {
            throw new NotActiveException("not in call to writeObject");
        }
        Object curObj = ctx.getObj();
        ObjectStreamClass curDesc = ctx.getDesc();
        curPut = new PutFieldImpl(curDesc);
    }
    return curPut;
}
 
Example 15
Source File: ObjectOutputStream.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Write the non-static and non-transient fields of the current class to
 * this stream.  This may only be called from the writeObject method of the
 * class being serialized. It will throw the NotActiveException if it is
 * called otherwise.
 *
 * @throws  IOException if I/O errors occur while writing to the underlying
 *          <code>OutputStream</code>
 */
public void defaultWriteObject() throws IOException {
    SerialCallbackContext ctx = curContext;
    if (ctx == null) {
        throw new NotActiveException("not in call to writeObject");
    }
    Object curObj = ctx.getObj();
    ObjectStreamClass curDesc = ctx.getDesc();
    bout.setBlockDataMode(false);
    defaultWriteFields(curObj, curDesc);
    bout.setBlockDataMode(true);
}
 
Example 16
Source File: ObjectOutputStream.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Write the non-static and non-transient fields of the current class to
 * this stream.  This may only be called from the writeObject method of the
 * class being serialized. It will throw the NotActiveException if it is
 * called otherwise.
 *
 * @throws  IOException if I/O errors occur while writing to the underlying
 *          <code>OutputStream</code>
 */
public void defaultWriteObject() throws IOException {
    SerialCallbackContext ctx = curContext;
    if (ctx == null) {
        throw new NotActiveException("not in call to writeObject");
    }
    Object curObj = ctx.getObj();
    ObjectStreamClass curDesc = ctx.getDesc();
    bout.setBlockDataMode(false);
    defaultWriteFields(curObj, curDesc);
    bout.setBlockDataMode(true);
}
 
Example 17
Source File: ObjectOutputStream.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Write the non-static and non-transient fields of the current class to
 * this stream.  This may only be called from the writeObject method of the
 * class being serialized. It will throw the NotActiveException if it is
 * called otherwise.
 *
 * @throws  IOException if I/O errors occur while writing to the underlying
 *          <code>OutputStream</code>
 */
public void defaultWriteObject() throws IOException {
    SerialCallbackContext ctx = curContext;
    if (ctx == null) {
        throw new NotActiveException("not in call to writeObject");
    }
    Object curObj = ctx.getObj();
    ObjectStreamClass curDesc = ctx.getDesc();
    bout.setBlockDataMode(false);
    defaultWriteFields(curObj, curDesc);
    bout.setBlockDataMode(true);
}
 
Example 18
Source File: ObjectOutputStream.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Write the non-static and non-transient fields of the current class to
 * this stream.  This may only be called from the writeObject method of the
 * class being serialized. It will throw the NotActiveException if it is
 * called otherwise.
 *
 * @throws  IOException if I/O errors occur while writing to the underlying
 *          <code>OutputStream</code>
 */
public void defaultWriteObject() throws IOException {
    SerialCallbackContext ctx = curContext;
    if (ctx == null) {
        throw new NotActiveException("not in call to writeObject");
    }
    Object curObj = ctx.getObj();
    ObjectStreamClass curDesc = ctx.getDesc();
    bout.setBlockDataMode(false);
    defaultWriteFields(curObj, curDesc);
    bout.setBlockDataMode(true);
}
 
Example 19
Source File: ObjectOutputStream.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Write the non-static and non-transient fields of the current class to
 * this stream.  This may only be called from the writeObject method of the
 * class being serialized. It will throw the NotActiveException if it is
 * called otherwise.
 *
 * @throws  IOException if I/O errors occur while writing to the underlying
 *          <code>OutputStream</code>
 */
public void defaultWriteObject() throws IOException {
    SerialCallbackContext ctx = curContext;
    if (ctx == null) {
        throw new NotActiveException("not in call to writeObject");
    }
    Object curObj = ctx.getObj();
    ObjectStreamClass curDesc = ctx.getDesc();
    bout.setBlockDataMode(false);
    defaultWriteFields(curObj, curDesc);
    bout.setBlockDataMode(true);
}
 
Example 20
Source File: ObjectOutputStream.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/**
 * Retrieve the object used to buffer persistent fields to be written to
 * the stream.  The fields will be written to the stream when writeFields
 * method is called.
 *
 * @return  an instance of the class Putfield that holds the serializable
 *          fields
 * @throws  IOException if I/O errors occur
 * @since 1.2
 */
public ObjectOutputStream.PutField putFields() throws IOException {
    if (curPut == null) {
        SerialCallbackContext ctx = curContext;
        if (ctx == null) {
            throw new NotActiveException("not in call to writeObject");
        }
        Object curObj = ctx.getObj();
        ObjectStreamClass curDesc = ctx.getDesc();
        curPut = new PutFieldImpl(curDesc);
    }
    return curPut;
}