class ProxyObjectOutputStream extends ObjectOutputStream
{
    /**
     * create an output stream which can be used to serialize an object graph which includes proxies created
     * using class ProxyFactory
     * @param out
     * @throws IOException whenever ObjectOutputStream would also do so
     * @throws SecurityException whenever ObjectOutputStream would also do so
     * @throws NullPointerException if out is null
     */
    public ProxyObjectOutputStream(OutputStream out) throws IOException
    {
        super(out);
    }

    @Override
    protected void writeClassDescriptor(ObjectStreamClass desc) throws IOException {<FILL_FUNCTION_BODY>}
}

        Class<?> cl = desc.forClass();
        if (ProxyFactory.isProxyClass(cl)) {
            writeBoolean(true);
            Class<?> superClass = cl.getSuperclass();
            Class<?>[] interfaces = cl.getInterfaces();
            byte[] signature = ProxyFactory.getFilterSignature(cl);
            String name = superClass.getName();
            writeObject(name);
            // we don't write the marker interface ProxyObject
            writeInt(interfaces.length - 1);
            for (int i = 0; i < interfaces.length; i++) {
                Class<?> interfaze = interfaces[i];
                if (interfaze != ProxyObject.class && interfaze != Proxy.class) {
                    name = interfaces[i].getName();
                    writeObject(name);
                }
            }
            writeInt(signature.length);
            write(signature);
        } else {
            writeBoolean(false);
            super.writeClassDescriptor(desc);
        }
    
<methods>public void <init>(java.io.OutputStream) throws java.io.IOException,public void close() throws java.io.IOException,public void defaultWriteObject() throws java.io.IOException,public void flush() throws java.io.IOException,public java.io.ObjectOutputStream.PutField putFields() throws java.io.IOException,public void reset() throws java.io.IOException,public void useProtocolVersion(int) throws java.io.IOException,public void write(int) throws java.io.IOException,public void write(byte[]) throws java.io.IOException,public void write(byte[], int, int) throws java.io.IOException,public void writeBoolean(boolean) throws java.io.IOException,public void writeByte(int) throws java.io.IOException,public void writeBytes(java.lang.String) throws java.io.IOException,public void writeChar(int) throws java.io.IOException,public void writeChars(java.lang.String) throws java.io.IOException,public void writeDouble(double) throws java.io.IOException,public void writeFields() throws java.io.IOException,public void writeFloat(float) throws java.io.IOException,public void writeInt(int) throws java.io.IOException,public void writeLong(long) throws java.io.IOException,public final void writeObject(java.lang.Object) throws java.io.IOException,public void writeShort(int) throws java.io.IOException,public void writeUTF(java.lang.String) throws java.io.IOException,public void writeUnshared(java.lang.Object) throws java.io.IOException<variables>static final boolean $assertionsDisabled,private final java.io.ObjectOutputStream.BlockDataOutputStream bout,private java.io.SerialCallbackContext curContext,private java.io.ObjectOutputStream.PutFieldImpl curPut,private final java.io.ObjectOutputStream.DebugTraceInfoStack debugInfoStack,private int depth,private final boolean enableOverride,private boolean enableReplace,private static final boolean extendedDebugInfo,private final java.io.ObjectOutputStream.HandleTable handles,private byte[] primVals,private int protocol,private final java.io.ObjectOutputStream.ReplaceTable subs