can! but you cannot include what classes cannot be serialized.excludes the classes such as ResultSet,Connection and so on.

解决方案 »

  1.   

    to vcvj(福州,想2厦门,挣$还房款ing,想车ing) :是不是这个返回的对象必须implements Serializable?
    还是不知道如何进行序列化啊?函数:
    public void serialize(QName name, Attributes attributes, Object value,
                            SerializationContext context)
    中,我应该怎么做?请帮帮忙啊!
      

  2.   

    implements Serializable 只要在类里继承它就已经序列化了
      

  3.   

    这个对象必须要implements Serializable
      

  4.   

    Object o;//要序列化并实现了Serializable接口的对象
    ByteArrayOutputStream baos=new ByteArrayOutputStream();
    ObjectOutputStream oos=new ObjectOutputStream(baos);
    oos.writeObject(o);//序列化new ByteArrayInputStream bais=new ByteArrayInputStream(baos.toArray());
    ObjectInputStream bis=new ObjectInputStream(bais);
    Object obj=bis.readObject();//反序列化
      

  5.   

    在序列化器的函数
    public void serialize(QName name, Attributes attributes, Object value,
                            SerializationContext context)
    中应该怎么做啊?还不是明白啊