Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Problem with Beans

  • 30-03-2004 8:28am
    #1
    Closed Accounts Posts: 17,208 ✭✭✭✭


    I'm having a problem getting my class to work properly through java.beans.XMLEncoder.writeObject()

    What I want is for the XML file to contain both the class header and the data inside in the Vector. I've never really used Beans before, but the tutorials I have read basically say that as long as you implement Serializable you should have no bother...

    Yet all I get is the basic class header in the XML file. Can anybody tell me what I need to do to get this working?

    Thanks in advance!
    public class FileStructure implements Serializable
    {
      Vector fileStructure = new Vector();
    
      public void addDirectory(File root, boolean subfolders) throws
          InvalidDirectoryException
      {
        
      }
    
      public void addFiles(File[] target) throws InvalidFileException
      {
        
      }
    
      public void remove(File root) throws IOException
      {
        
      }
    
      public File[] describe()
      {
        
      }
    
      public DefaultMutableTreeNode describeAsTree()
      {
       
      }
    
      public long count()
      {
        
      }
    
      public class InvalidDirectoryException extends Exception
      {
        
      }
    
      public class InvalidFileException extends Exception
      {
        
      }
    }
    


Advertisement