Article View: borland.public.jbuilder.java.language
Article #16132Re: Saving Mixed Data Types
From: Richard Wilkman
Date: Mon, 29 Mar 1999 00:00
Date: Mon, 29 Mar 1999 00:00
87 lines
3598 bytes
3598 bytes
Adam: Well, you have to write your data object (unless there's already something in Java that does exactly what you want). You encapsulate your reading and writing code in your custom object (using the classes in java.io) as methods to that class. -Rich Adam Lubell wrote: > > Richard Wilkman wrote: > > > > Adam: > > > > Couple suggestions... > > > > Just persist to disk as a file. Open a stream and write your data out > > by querying the objects for your value is the fast, low-tech way to do > > it. > > > > Up a notch from that would be to have a data object that encapsulated > > all the data from the other fields and you would work with that to > > read and write. > > > > Which object/component/class should I try to make the data object from > so that the read and write procedures are already defined, and that I > don't limit the data types that it can store? > > > -Rich > > > > Adam Lubell wrote: > > > > > > I'm new at Java, and using JBuilder2. I've gone through the provided > > > tutorials, and created few of my own simple programs. > > > > > > Now that I'm trying to write a "real program", I can't find any info on > > > the best way to approach saving data of various types. > > > > > > I need to create a form with some Edit Fields, a Grid and a TextArea. > > > My program will perform some calculations and output a report. I know > > > how to do all of this. > > > > > > What I need to do is find a way of collecting all of the input fields > > > and save and load them from a single data file. > > > I don't need to save the answers, and I want to keep the data file as > > > small as possible. > > > > > > My thought was to use one container object and make it serializable. > > > > > > Is this the best approach? > > > Which standard component is best to use for the container? > > > Any samples, tutorials, books that give advice on how to do this? > > > What do I "search" for in the help? > > > > > > Thanks > > > > -- > > > > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= > > Rich Wilkman > > Senior Quality Assurance Engineer > > Borland JBuilder Team > > > > If you see something that looks like an opinion up there, > > it's mine and mine alone. > > > > Mail sent to me from the newsgroups won't bounce but will > > be ignored. If I have time, I'll respond, but you have > > a better chance if you confine your posts to the newsgroups > > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Rich Wilkman Senior Quality Assurance Engineer Borland JBuilder Team If you see something that looks like an opinion up there, it's mine and mine alone. Mail sent to me from the newsgroups won't bounce but will be ignored. If I have time, I'll respond, but you have a better chance if you confine your posts to the newsgroups =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Technical Details
Message-ID:
<36FFA6DD.F897BF2@inprise.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<36FBEEDF.F750F653@sprint.ca> <36FBF8AF.8F31661F@inprise.com> <36FE6769.1D9D9A80@sprint.ca>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,9e3749d762323ea0 X-Google-Attributes: gidf74b3,public From: Richard Wilkman <rwilkman@inprise.com> Subject: Re: Saving Mixed Data Types Date: 1999/03/29 Message-ID: <36FFA6DD.F897BF2@inprise.com> X-Deja-AN: 460388307 Content-Transfer-Encoding: 7bit References: <36FBEEDF.F750F653@sprint.ca> <36FBF8AF.8F31661F@inprise.com> <36FE6769.1D9D9A80@sprint.ca> Content-Type: text/plain; charset=us-ascii Organization: Another Netscape Collabra Server User Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.language