Best way to store objects' properties and later remake those objects?

I want to create a bunch of objects, set their properties and then save that so on restart, the objects can be reconstituted. Is serialization the best way/ Some other way? I want to store them in XML so I can also create a GUI to show the objects stored.

JoachimSauer wrote:
6tr6tr wrote:
I want to create a bunch of objects, set their properties and then save that so on restart, the objects can be reconstituted. Is serialization the best way/ Some other way?Serialization is definitely one way to do that.
I want to store them in XMLUse JAXB or XMLEncoder/XMLDecoder.
so I can also create a GUI to show the objects stored.What does a GUI have to do with writing XML? I don't see how that's in any way related.Thanks. What I meant was that I want to have a JTree populated easily with that info and I know there's good support for populating a JTree with XML.

Similar Messages

  • Best way to store app properties

    I need to port web application to WebLogic.
    Old one use couple of ".config" files stored with .class file in same
    directory
    (so, by getting from system properties "classpath" and scanning trough all
    directories ".config" files can be found and loaded)
    on weblogic it doesn't work any more.
    So, I'm thinking about:
    1. how to make it accessible from some place related to weblogic home
    (app can be deployed on servers with weblogic on different directories. so,
    I can't use absolute path )
    2.That is best way to store such stuff? (For future or just rewrite app)

    Privet
    You can store trivial properties in web.xml (context-param, init-param).
    If your app requires .config files you can package them with application
    classes and use Class.getResource...(...) to access them (class should be
    one of your applications classes loaded by WAR classloader), or place them
    in the WEB-INF/ directory and use ServletContext.getResource...("/WEB-INF/xxx.config").
    Sergey Pomytkin <[email protected]> wrote:
    I need to port web application to WebLogic.
    Old one use couple of ".config" files stored with .class file in same
    directory
    (so, by getting from system properties "classpath" and scanning trough all
    directories ".config" files can be found and loaded)
    on weblogic it doesn't work any more.
    So, I'm thinking about:
    1. how to make it accessible from some place related to weblogic home
    (app can be deployed on servers with weblogic on different directories. so,
    I can't use absolute path )
    2.That is best way to store such stuff? (For future or just rewrite app)--
    Dimitri

  • What's the best way to store old FCP projects & media?

    Hey
    I've started to accumulate more and more video content of client projects, but I don't want to delete it in case they come back a year later looking for an update on the video product I made them.
    So, what's he best way to store FCP projects and video files?
    I thought maybe a BluRay burner might do the trick.
    Any suggestions?
    Sam

    Since you're using RAW files you might peruse the DAM Forum to learn about possible other DAM (digital asset management) software and workflows. There is a wealth of information at that site.
    I useMedia Expression for my primary DAM application and iPhoto for special projects like books, calendars, etc.

  • What is the best way to store and search 2D data

    Hi,
    There is a set of data (~10k records ) in 2D dimension.
    like this :
    Col 1, Col 2, Col3....
    What is the best way to store and search those records ?
    Thanks in advance
    Wilson

    Hi,
    Either userObjet[][] if you know how much data you have, and the data size is fixed, or use a list of lists. E.g. A Vector of Vectors (some will probably say that you should use an ArrayList instead, and that could be the case, but it sounds like you would want to display the data later on, and a DefaultTableModel (for JTables) uses a Vector as data holder).
    Kaj

  • Best way to store documents and images in a web application

    All,
    Which is the best way to store the documents, is it Oracle DB or file system or Virtual Directory Mapping in weblogic.
    We are working on a Internet based application into CRM domain, there is a requirement where user can upload and download the documents (.pdf, .xls, .doc etc). Right now we are storing images in the DB. Is it advisable to store all the docs in database and will it scale up in future.
    PS: There is no scope for using content server because of business constraints.
    Please let me know, thanks in advance.
    Regards
    Girish

    Best way to store depends entirely on requirements.
    Why store it in the database when it for example is purely static images (e.g. used as part of the web GUI)? Instead that can be served up directly by a web server - which is specifically designed for this.
    If it is more than just an image, but include tags (non spatial data attributes), requires transaction control (e.g. updating an old passport/id photo with a newer one), auditing, filtering/searching and ordering, requires backup, needs security and access controls, and so on - than that is most definitely a database function.
    So the issue is not what the binary file is or contains - an image or pdf or something else. It depends entirely on how it is to be used and what the business requirements are in this respect.

  • Can you suggest a best way to store and read arabic from oracle database?

    Hi ,
    can you suggest a best way to store and read arabic from oracle database?
    My oracle database is Oracle Database 10g Release 10.1.0.5.0 - 64bit Production on unix HP-UX ia64.
    NLS_NCHAR_CHARACTERSET AL16UTF16
    NLS_LANGUAGE AMERICAN
    NLS_TERRITORY AMERICA
    NLS_CHARACTERSET WE8ISO8859P1
    I have presently stored the data in nvarchar2 field. But i am not able to display it correctly.

    Using the national characterset should work but there are other factors that you have to consider when working with NCHAR/NVARCHAR2/NCLOB.
    If possible, changing the characterset is usually the best solution if it's a possiblity for you.
    For more info:
    Dear Gurus: Can u pls explain the difference between VARCHAR2 & NVARCHAR2??

  • Best Way to store references to other objects

    Hi there,
    I want to design a class, that has several references to other instances. What is the best way to store such references within the class? As a vector? As a Hash-Table?
    What I need are:
    -get a certain element in this data-structure fast (let's say the fifth)
    -be able to list all elements referenced
    -delete a certain element (e.g. 5th one out of 10)
    What I do not necissarily need is:
    -to be able to search if a certain object is referenced by this one
    What do you propose?
    Any ideas?
    Thx
    Karlheinz Toni

    Any thoughts on hashtables etc?
    I used them in an application where i needed to get
    objects quickly. It allowed me to get the objects
    based on a criteria instead of by the object itself.
    It was really useful for me.Use HashMap instead of Hashtable. HashMap would also work but you can't get element 5 unless you use the element number as a key. If you do use the element number as the key, it's kind of like using a List except it won't renumber itself, which you may or may not want. For example, if you remove element 5 from a List element 6 (if it exists) becomes element 5. If you remove key 5 from the HashMap you just don't have an element 5 anymore i.e. the map will return null for get(new Integer(5));

  • Best way to store data from a plot on hard drive

    I have a DAQ set-up that will be on 24/7 for several days, and the whole time it's streaming data to an XY-Graph with a limited buffer.  My question is, what's the best way to store my plot data in such a way that I can empty out my plot every few hours but if I want to pull up data from a few hours ago I would just have an option on my initial VI to view any old saved plot data.
    Basically, I'm trying to not overload my RAM with all my plot data so I'd like to save it to the hard drive while my VI is running, and only display, for example the last 8 hours worth of data... I've been looking at TDMS, but I'm not sure if that's the right solution.  
    much thanks!

    Hi,
    You could save your data using TDMS as well as ASCII to simply load it in another application later.
    Attached VI shows you how to save your data to a File after a certain amount of iterations, you can combine this then with your code and a timestamp.
    Christian
    Attachments:
    Save to new file every N samples.vi ‏20 KB

  • Best way to store an AES Key

    Hello,
    I'm currently developing a little "file vault" , with graphical interface, to enable end users to encrypt/decrypt some of their personal files on teh filesystem
    I'm currently using AES as Cipher :
    the first time the user launches the UI, i generate an key for AES then store it (encoded as Base64) in Registry (if Windows) using java.util.Preferences
    Doing this, later, the application automatically retrieves this key for decrypt/encrypt tasks.
    Is this the best way to store this kind of key.
    I currently ask myself if i couldn't (as second option) leave the user choose a key first : the user should then retype this key at every launch of the application to be able to decrypt/encrypt his files.
    What is the best way?
    Laurent

    As far as i understand in the document PKCS#5 , to do my application, i should use the PBES2 (password based encryption scheme 2), respecting the following steps :
    Encryption:
    1) Select a Password (P) : this password is not stored on the system, the user will provide it to the application for every operation (dec / enc)
    2) Select a Salt (S) : i wonder if first time i should use a pseudo random generator, then store the Salt on the System (where on Windows or Linux?...)
    3) Select an iteration Count (c) : should be > 1000
    4) select a derived key Length (dkLen)
    5) Create a derived key (DK) using the formula : DK = DKF(P,S,c,dkLen)
    6) Encrypt clear Message M using the Derived Key (DK) an the algorithm AES, to obtain the Cipher Text (C)
    Decryption:
    Repeat steps 1 to 5
    6) Decrypt Cipher Text (C) using DK and AES algorithm to obtain the clear message (M)
    Does it sound good for you.
    My question is always the same :
    Should i hard code in my application the Salt ,the Iteration Count, and the derived key length or , should i first generate a pseudo random Salt, then store it on the file system (Windows Registry, File)
    Any idea?
    Laurent
    Message was edited by:
    Laurent_Bois

  • Best way to store many images at once is?

    I am dealing with a number of image files at once (10 - 100) that are small in size (5-300kb) and I want to be able to retrieve them quickly after I save them to disk. I want to store them all in an array and save the array. What is the best way to store them as so I can save space on my disk and load them back in quickly when I need them. I tried using an array of ints and that is slow to load and takes a lot of space on disk.
    Thanks

    maybe this is what you want, from javadocs,
    public class MediaTracker
    extends Object
    implements Serializable
    The MediaTracker class is a utility class to track the status of a number of media objects. Media objects could include
    audio clips as well as images, though currently only images are supported.
    To use a media tracker, create an instance of MediaTracker and call its addImage method for each image to be
    tracked. In addition, each image can be assigned a unique identifier. This identifier controls the priority order in which
    the images are fetched. It can also be used to identify unique subsets of the images that can be waited on independently.
    Images with a lower ID are loaded in preference to those with a higher ID number.
    Here is an example:

  • What's the best way to store my info externally

    I have recently bought my first Macbook Pro 13" with 2.4 Ghz. I am currently using it for my own business and do tend to get a lot of files together. I went to look at "About this Mac" and have already got 369 Gb used up in storage... I have no idea how I have done that as I have hardly downloaded any apps on this computer besides the ones that were on here. I did download Vware Fusion 4 as I have a reservation system which I used to run on my pc and need to have this on here too so perhaps that software takes a lot of space.
    Could anyone advise on which is the best way to store my info externally, will any external harddrive do, or do you need a special one for Apple or Macbook pro. I am just asking as I have no idea and prefer to buy the right one straight away.
    Any help would be much appreciated !
    Thanks, Sara***

    Sara,
    The most reliable method is to use an external hard drive.  Some are better than others, but most will work.
    For the least amount of setup pain, I prefer to deal with the Mac specialists at OWC, http://www.macsales.com as they stand behind their products with great warranty and support.  I have one of their Mercury Elite Pro 2 TB drives that has multiple interface capability so you can get a fast interface for data transfer.
    Take a look at what they offer and see what fits your needs.  If you have more questions about doing thin, just ask on here.
    Ralph

  • What is the best way to safeguard my files and pictures before I send off my MacBook Pro to get fixed?

    What is the best way to safeguard my files and pictures before I send off my MacBook Pro to get fixed? I am running Mavericks and use an AirPort Time Machine to back-up all my files.

    Back up all data on the internal drive(s) before you hand over your computer to anyone. You need at least two independent backups to be completely safe. There are ways to back up a computer that isn't fully functional—ask if you need guidance.
    If privacy is a concern, erase the data partition(s) with the option to write zeros* (do this only if you know how to restore to an empty drive.) Don’t erase the recovery partition, if present.
    Keeping your confidential data secure during hardware repair
    Apple also recommends that you deauthorize a device in the iTunes Store before having it serviced.
    *An SSD doesn't need to be zeroed.

  • Best way to store 36 values

    Hello,
    I need to store 6 types of values with combination of 6X8 values totally 288 value .
    For Example
    1[{1,2,2,59,7,8,9,6},{1,2,2,59,7,8,9,6},{1,2,2,59,7,8,9,6},{1,2,2,59,7,8,9,6},{1,2,2,59,7,8,9,6},{1,2,2,59,7,8,9,6}]
    2[{1,2,2,59,7,8,9,6},{1,2,2,59,7,8,9,6},{1,2,2,59,7,8,9,6},{1,2,2,59,7,8,9,6},{1,2,2,59,7,8,9,6},{1,2,2,59,7,8,9,6}]
    3[{1,2,2,59,7,8,9,6},{1,2,2,59,7,8,9,6},{1,2,2,59,7,8,9,6},{1,2,2,59,7,8,9,6},{1,2,2,59,7,8,9,6},{1,2,2,59,7,8,9,6}]
    4[{1,2,2,59,7,8,9,6},{1,2,2,59,7,8,9,6},{1,2,2,59,7,8,9,6},{1,2,2,59,7,8,9,6},{1,2,2,59,7,8,9,6},{1,2,2,59,7,8,9,6}]
    5[{1,2,2,59,7,8,9,6},{1,2,2,59,7,8,9,6},{1,2,2,59,7,8,9,6},{1,2,2,59,7,8,9,6},{1,2,2,59,7,8,9,6},{1,2,2,59,7,8,9,6}]
    6[{1,2,2,59,7,8,9,6},{1,2,2,59,7,8,9,6},{1,2,2,59,7,8,9,6},{1,2,2,59,7,8,9,6},{1,2,2,59,7,8,9,6},{1,2,2,59,7,8,9,6}]
    How can i store these values in c# ?,which is the best way with respect to performance and security.
    And whether i can store these data's in separate class file and access at time of process which is a multi-threading process.
    If i asked any thing wrong sorry as i am new in these things.
    Thanks

    Try this
    List<List<List<int>>> input = new List<List<List<int>>>(){
    new List<List<int>>(){
    new List<int>(){1,2,2,59,7,8,9,6},new List<int>(){1,2,2,59,7,8,9,6},new List<int>(){1,2,2,59,7,8,9,6},
    new List<int>(){1,2,2,59,7,8,9,6},new List<int>(){1,2,2,59,7,8,9,6},new List<int>(){1,2,2,59,7,8,9,6}},
    new List<List<int>>(){
    new List<int>(){1,2,2,59,7,8,9,6},new List<int>(){1,2,2,59,7,8,9,6},new List<int>(){1,2,2,59,7,8,9,6},
    new List<int>(){1,2,2,59,7,8,9,6},new List<int>(){1,2,2,59,7,8,9,6},new List<int>(){1,2,2,59,7,8,9,6}},
    new List<List<int>>(){
    new List<int>(){1,2,2,59,7,8,9,6},new List<int>(){1,2,2,59,7,8,9,6},new List<int>(){1,2,2,59,7,8,9,6},
    new List<int>(){1,2,2,59,7,8,9,6},new List<int>(){1,2,2,59,7,8,9,6},new List<int>(){1,2,2,59,7,8,9,6}},
    new List<List<int>>(){
    new List<int>(){1,2,2,59,7,8,9,6},new List<int>(){1,2,2,59,7,8,9,6},new List<int>(){1,2,2,59,7,8,9,6},
    new List<int>(){1,2,2,59,7,8,9,6},new List<int>(){1,2,2,59,7,8,9,6},new List<int>(){1,2,2,59,7,8,9,6}},
    new List<List<int>>(){
    new List<int>(){1,2,2,59,7,8,9,6},new List<int>(){1,2,2,59,7,8,9,6},new List<int>(){1,2,2,59,7,8,9,6},
    new List<int>(){1,2,2,59,7,8,9,6},new List<int>(){1,2,2,59,7,8,9,6},new List<int>(){1,2,2,59,7,8,9,6}},
    new List<List<int>>(){
    new List<int>(){1,2,2,59,7,8,9,6},new List<int>(){1,2,2,59,7,8,9,6},new List<int>(){1,2,2,59,7,8,9,6},
    new List<int>(){1,2,2,59,7,8,9,6},new List<int>(){1,2,2,59,7,8,9,6},new List<int>(){1,2,2,59,7,8,9,6}}
    jdweng

  • Best way to store big amount of data

    Hi, i need to store a big amount of data, written in a txt its size is almost 12 mg, anyway it depends on the computer it runs, beacause what i want to store is all the shared files in a computer.
    Which is the best way to store it? Array string? textfile? List? I don�t need the data after the app close.
    Thanks

    Well, then which is the best solution? LinkedList or
    Tree? i only need to store the full path.
    What i didn�t say, my fail, is that i need to search
    for a file name once i have stored them...For searching, LinkedList will be very slow if it's very large. I think the same is true of javax.swing .tree.DefaultTreeModel, which is the JDK's only tree implementation. I don't know what Jakarta-collections has - it's possible they have a tree that offers fast searching. If you want to stick to the standard Java libraries, you'll want a Set for fast searching. TreeSet keeps the entries in sorted order. If you also need to display them as a tree, you can keep them in both a Set and a tree. If you don't have enough memory to do that, then displaying the whole tree isn't going to be useful to the user anyway, so rethink your goal.

  • Best way to store TenantID in Azure

    I'm developing a multi tenant application
    I am using ASP.NET MVC and Asp.net Identity for authentication
    My client can have more than one company and you can change, user have multiple company
    I wonder what is the best way to store the TenantID in azure
    Claims?
    I'm Claims my value is:
    Type = "TenantId"
    Value = is Guid ( difficult or impossible to be guessed by changing the value of the cookie )
    Cache?
    Session ["TenatId"]?
    Router? {tenantid}}/controller/action

    Hi
    When you get a Graph Token from AAD, it has an Issuer claim in the Claims that has the TenantId in it, so you don't need to store the TenantId in a different claim:
    Sample issuer claim:<Issuer>https://sts.windows.net/cbb1a5ac-f33b-45fa-9bf5-f37db0fed422/</Issuer>For your reference of all available claims in AAD token take a look at here:https://msdn.microsoft.com/en-us/library/azure/dn195587.aspx#BKMK_TokenClaims
    Regards
    Aram

Maybe you are looking for

  • How do I find out when openreach are connecting my...

    Ok so I'm now at the point of tearing my hair out.... After a fault with our line almost 2 years ago I got talking to the engineer. He told me that the board in the exchange that runs our broadband is set for fibre but would need all the other work t

  • Video - Play In iTunes Then Won't Sync

    I've just noticed that if I play a video in iTunes it will then no longer sync with the iPod. iTunes says its not a compatible format. I've just tested playing a video on the iPod (OK) then playing on Mac iTunes (OK) then resyncing. The video no long

  • Can't dismiss error message in Mail

    I tried to send a bulk e-mail from Mail and got an error message. From other discussions I've seen, it appears that the issue was that I tried to send it to too many people. The problem now is that I can't dismiss the error message. The message reads

  • I can't sign into Skype using Facebook anymore?

    Just recently, Skype updated without my consent, and now I'm not able to choose to login via Facebook. Logging in using my username, [Removed for privacy], does not work, and neither does signing in using aquaticdesert. I downgraded to 6.3, tried to

  • Firefox flash plug in crashes when playing farmville

    My flash plug in crashes often when playing farmville. i usually click ok to submit a report. mozilla must have thousands of crash reports from me. i have done everything i know to do to resolve the issue. so far i have cleared out cache, cookies and