Help.  Does use of .txt file make sense or code directly into an ArrayList

I am writing my first program and I want to put a series of information in various .txt files. This is because I will have a lot of different objects that I will create that will needed to be iterated over (most of the objects are similar in many ways). It seemed to me that a .txt file would be better than writing the items directly in an arraylist (if you know what i mean). What do you think?
There will be 7 different objects that will be iterated over (and there will be 12 other objects doing other things as well, they will not be in .txt format), and I thought instead of having to maintain it through the actual code, I would just have .txt files that I create in notepad or something so that when I need to make changes to one of the 7 objects I only have to get the .txt file instead of having to wade through the code to find that object.
Does this make sense?
It seems that I will now have to do a lot of I / O to make it work, so now I am thinking maybe it is better to simply use the arrylist. Is there a benefit of one over the other in this circumstance?
Also one of the objects has jpeg files that will need to be iterated over. Actually for these I will put them in an array list, because I can't seem to figure out yet how to get an image and the information about the image to display within I/O (like CD covers and their titles).
Thank you for any help and suggestions I feel a little overwhelmed, but hopeful, with you kind folks.
Peace
NB I know that I am not using the correct terminology, but I hope that you can understand what I mean.
Message was edited by:
peacerosetx

I am writing my first program and I want to put a
series of information in various .txt files. Thisis
because I will have a lot of different objects thatI
will create that will needed to be iterated over
(most of the objects are similar in many ways). It
seemed to me that a .txt file would be better than
writing the items directly in an arraylist (if you
know what i mean). What do you think? I think I do not know what you mean. I also think
that ArrayLists and files shouldn't replace eachI am going to use an ArrayList. Merci
other.
There will be 7 different objects that will be
iterated over (and there will be 12 other objects
doing other things as well, they will not be in.txt
format),Seven objects? Twelve objects? Huh? Why not use
arrays? And how do you get an object into a text
file?
and I thought instead of having to maintain
it through the actual code, I would just have .txt
files that I create in notepad or something sothat
when I need to make changes to one of the 7 objectsI
only have to get the .txt file instead of havingto
wade through the code to find that object.
Does this make sense? Your description? Not to me.
It seems that I will now have to do a lot of I / Oto
make it work, so now I am thinking maybe it isbetter
to simply use the arrylist. Is there a benefit of
one over the other in this circumstance? Uh, ArrayList is way faster and much easier
modifyable.
Also one of the objects has jpeg files that willneed
to be iterated over. Actually for these I will put
them in an array list, because I can't seem tofigure
out yet how to get an image and the informationabout
the image to display within I/O (like CD coversand
their titles). "Display within I/O"? This makes no sense.
NB I know that I am not using the correct
terminology, but I hope that you can understandwhat
I mean.If you're not using the correct terminology, there's
no chance for us to understand you. If you say
"objects" but mean "classes", then say classes.

Similar Messages

  • Does my DNG/RAW workflow make sense to you?

    Ive been shooting RAW from my Nikon D50, converting the files to DNG (3.3), opening them in Adobe Camera RAW (2.4) using PSCS, processing and saving in TIFF (often through a droplet). In the process I retain the original RAW .NEF file, create a universal DNG file, and finally create a lossless TIFF file.
    I do things this way because I want the supposedly more universal format of DNG, and Camera RAW 2.4 (which runs on CS) doesnt officially support the D50 .NEF file.
    I cant think of a reason to upgrade either the DNG converter or Camera RAW files. It appears that the new versions basically just support new cameras. Besides, to do so Id have to upgrade to CS3, and thats totally out of the question.
    I take about 2,500-3,000 shots a year not counting the ones I take for experimenting with different settings and such. I know some folk might think my process is time consuming and/or overkill to create and retain DNGs AND TIFFs, but Im thinking it just makes sense. Does this workflow make sense to anyone other than myself?
    Im going to post this in both the RAW and DNF forums to see who thinks what. Thanks for your opinions!

    Ive been hanging around the forums for a couple years now and have learned quite a bit from the others. Perhaps Ive helped others in the meantime. Im thinking thats the intent of the forum. Ive seen people blasted for not being as knowledgeable as some of the others and Ive always thought it's a shame. However, it appears Ive accidentally irritated folk by asking an opinion of something.
    I mentioned in the OP that I'll not be upgrading to CS3 or any other version of PS. So by default, and a point not picked up by some- the question is really in regard to the newer version of DNG and NOT Camera RAW.
    When I looked at the download page it appeared that the new version of DNG might somehow be connected to RAW. After all, they are in the same .ZIP file. Mr. Knoll was kind enough to point out that the newest version of DNG didnt require a PS upgrade. I should have figured that out myself as its a stand alone program, but by the way it was packaged Anyway, I downloaded the file, and unzipped it. Then ran DNG.
    It works fine. Just as the previous version. But what I was asking, and what some people took issue with, was if there were features that had been faulty with previous version, or perhaps previous versions did work with RAW formats from certain cameras. Things like that.
    I was thinking Mr. Knoll or another knowledgeable person might respond with Sure, Thomas, the newer version of DNG processes batch files much faster due to an improved bit-handling algorithm or Naw, the newer version of DNG is just compatible with more camera formats, so if the version you have works, no need to upgrade, or maybe even The newer version fixes a few minor issues with converting files over 9 MB in size.
    Instead, I was told that I wouldn't be asking such a preposterous, absurd question. if I had read the linked article. Well, prior to my second post, I did read it read it. Its a nicely written article with some great shots of the interface. It touts the new RAW as the best there is, and according to the author, Jeff Schewe, its well worth the price. But I also noticed it said nothing of the new version of DNG. Maybe thats because the article is titled About Camera RAW 4.1.
    Thank you, Mr. Knoll and G Sch.

  • Does a QMaster Cluster really make sense for Final Cut Server?

    Correct me if I'm wrong, and I often am, but my understanding of the difference between setting up a "Cluster" and just using "This Machine" is the cluster allows multiple jobs to be processed simultaneously, while an unmanaged system will only do one job at a time. However, when it does that one job, it uses all the system's processors.
    Yesterday I created a cluster consisting of two Quad Core Intel systems, and started Final Cut Server cataloging about a half a TB of data. I noticed that Server submits the Proxy render jobs one at a time, and that the jobs were being submitted to only one processor core, in a rotating fashion. Is there a way to make FCServer submit jobs in "parallel," or am I better off with using just the local system for transcoding?

    The default proxy transcode setting seems to be specifically tuned to work at a small scale, which makes sense if you are asking a box to host the database, serve the app, and do all the proxy transcodes. I observed the same phenomenon, so I made my own transcode setting for proxies and I chose to lower the bitrate a bit to help with file size and transfer time. The upside is the floodgates are wide open when my 32 core Xeon cluster (four 8-cores) goes to town on a proxy encoding job.
    Your other observation is also right, that only one item is encoded at a time across the cluster rather than working on all of them at once across the cluster. So what you get with a fast cluster is shorter encode time, not parallel encodings that all finish at the same time.
    If you have the spare machines to dedicate to cluster work, I strongly endorse setting up that way. I would not recommend Quick Clusters for Final Cut Server encoding duty. Either set up a dedicated Managed Cluster that FCSvr can use or none at all.

  • Does an "incomplete font" warning make sense for ttf?

    Hi all,
    we are getting "font incomplete" errors in the package dialog. According to the online help this "Lists fonts that have a screen font on the current computer but not a corresponding printer font."
    Does that even make sense for true types? As far as I know there is no such thing as a separate screen and printer font in ttf.
    To make things worse the fonts in question are Georgia and Times New Roman - both are system fonts.
    Specs:
    Windows 7 64 bit SP1
    InDesign 7.04
    I can't reproduce this on my machine but that's running 32 bit.
    Should we ignore it?
    Any hints appreciated - tried a forum search but didn't find very much.
    Regards,
    Mike

    There is no real erro message but a warning in the package dialog (sorry but we are using the German version):
    The report doesn't offer much more information:
    SCHRIFTARTEN
    (Nur Probleme anzeigen)
    17 Schriftart(en) verwendet; 0 fehlend, 10 eingebettet, 2 unvollst., 0 geschützt
    - Name: Georgia; Typ: OpenType TrueType, Status: unvollst.
    Dateiname: n. zutr.
    Vollständiger Name: Georgia
    Zuerst verwendet auf Seite: 31
    Geschützt: Nein
    - Name: TimesNewRomanPSMT; Typ: OpenType TrueType, Status: unvollst.
    Dateiname: n. zutr.
    Vollständiger Name: Times New Roman
    Zuerst verwendet auf Seite: 30
    Geschützt: Nein
    We actually don't even know where TimesNewRoman comes from - I suspect it's in one of the numerous linked pdf files. But then the dialog should state which files they come from.

  • Does iPhone as tethering device make sense?

    Why pay to use the iPhone as a tethering device instead of just using the iPhone itself?  People using iPhone to tether their iPad in particular doesn't make much sense to me since they pretty much have the same function (one just has a bigger screen).
    Does it really make sense to pay another $25 a month to tether the iPad to the iPhone when you can just use the iPhone to do what you need done?  I'm asking because it would be nice I guess, but can someone really make a good case for the extra money spent for this?
    Message was edited by: Drew9803

    Actually there is two prices for Data Service.
    iPhone 3G Data Features
    Enterprise Data Plan for iPhone
    $45.00
    N/A
    Unlimited
    Select
    DataPro 2GB for iPhone Enterprise
    $40.00
    N/A
    2GB
    Select
    DataPro 2 GB for iPhone
    $25.00
    N/A
    2GB
    Select
    DataPlus 200 MB for iPhone
    $15.00
    N/A
    200MB
    Select
    iPhone 3G Tethering Features
    DataPro 4GB for iPhone Enterprise
    $60.00
    N/A
    4GB
    Select
    DataPro 4GB for iPhone
    $45.00
    N/A
    4GB
    Current
    A $15.00 Difference in Cost.....

  • Does using secure disk erase make computer run faster?

    Does using the secure disk erase help mac book pro to run faster?

    No. That option should only be used for sensitive files; the Disk Utility's command for it is meant for secure deletion of files which were insecurely deleted or when the entire drive needs to be securely wiped.
    (68230)

  • Little Help plz - Reading in TxT files

    I currently have the following piece of code, but want to adapt it to cater for more attributes in the text file, any suggestions to how i go about this? Thanks
    import java.io.*;
    public class InputFile
    public static void main(String[] args) throws IOException
    final String textFilesPath = "C:/Documents and Settings/Daniel/Desktop/";
    BufferedReader inputFile;
    String moduleCode;
    int mark;
    inputFile = Text.open ( textFilesPath + "modules.txt" );
    System.out.println ( "Module code\tMark" );
    moduleCode = Text.readString ( inputFile );
    while ( moduleCode.equals ( "****" ) == false )
    mark = Text.readInt ( inputFile );
    System.out.println ( moduleCode + "\t\t" + mark );
    moduleCode = Text.readString ( inputFile );
    }//end-while
    inputFile.close();
    }//main
    }//InputFile

    You can use something like this then
    File ffile = new File( /*your file*/);
                   FileInputStream fis = new FileInputStream(ffile);
                   BufferedInputStream bis = new BufferedInputStream(fis);
                   DataInputStream dis = new DataInputStream(bis);
                        int filelength = dis.read(infile);
                        String filestring = new String(infile, 0, filelength);
                                    //write the file
                                    FileWriter write = new FileWriter(/*your file*/);   
                                    write.write(filestring);
                                    write.close();Message was edited by:
    mark07

  • Help with input output .txt files!

    Hi i'm a student and totally new to programming. I need the program to read a .txt file and then output it:
    import java.io.*;
    import java.util.*;
    public class Reading{
         public static void main(String[] args)throws Exception{
              Scanner scanner = new Scanner(new File(args[0]));
              while(scanner.hasNext()){
                   System.out.println(scanner.next());
              scanner.close();
    and
    import java.io.*;
    public class Writing{
         public static void main(String[] args)throws Exception{
              String outputFile = args[0];
              PrintWriter writer = new PrintWriter(new BufferedWriter(new FileWriter(outputFile)));
              for(int i = 0; i < 100; i++){
                   writer.println(i * i);
              writer.close();
    How would i merge these together? I also changed the command line to java Reading Input.txt but it wont run on DrJava on my computer or laptop and i get an error? How do i then store the strings into an arraylist and iterate throught the arraylist to reverse the strings?
    Please help.

    You could do this...
    import java.io.*;
    import java.util.*;
    public class FileIO2
         public static void main(String argsp[])
              String readfile="ajr.txt";
              String writefile="ajr2.txt";
              try{
              read(readfile);
              write(writefile);
              catch(Exception e)
              {e.printStackTrace();}
         public static void read(String filename) throws Exception
              Scanner scanner = new Scanner(new File(filename));
              while(scanner.hasNext()){
                   System.out.println(scanner.next());
              scanner.close();
         public static void write(String filename) throws Exception
              String outputFile = filename;
              PrintWriter writer = new PrintWriter(new BufferedWriter(new FileWriter(outputFile)));
              for(int i = 0; i < 100; i++){
                   writer.println(i * i);
              writer.close();
    }

  • I have different TXT file in single folder from that that current date TXT files need to be get loaded into local database through SSIS Package

    Hi frds,
    I have fetched the TXT files through FTP from different location.All the file got loaded in my Local drive into single folder
    And in that  Folders i will have these kind of Files
    ACTEST00001_20141028_0405_INV.TXT
    ACTEST00001_20141029_0405_SL.TXT
    ACTEST00001_20141028_0405_SV.TXT
    ACTEST00001_20141029_0405_SV_APPT.
    And i need to load these only ''20141029'' files only.
    How can i do this in SSIS packege i need to skip rest all the files.
    I have attached the Structure of my SSIS packege.
    Please go through it and suggest me the solution please.
    Arunraj Kumar

    See
    this and
    this.
    Andy Tauber
    Data Architect
    The Vancouver Clinic
    Website | LinkedIn
    This posting is provided "AS IS" with no warranties, and confers no rights. Please remember to click
    "Mark as Answer" and "Vote as Helpful" on posts that help you. This can be beneficial to other community members reading the thread.

  • Read a txt file make it a clob

    Hello. I have a text file that I'd like to read and then set the contents to a clob value. I'm really not too familar with streams and buffers, so everything I've tried has been grasping at straws.
    I've tried reading the file with a fileReader object then writing it a string and trying to convert string to clob... no go
    FileReader frObject = new FileReader("d:\\jrun4\\servers\\test\\Ndadsbload1.txt");
    BufferedReader brObject = new BufferedReader(frObject);
    String line = brObject.readLine();
    String sFile = "";
    Clob clob;
    while (line != null) {
    sFile += line;
    line = brObject.readLine();
    I've read on clobs, and saw some on ascii streams, but I'm kinda stuck. Can anyone help me out?

    Thanks alot. That seems to make some sense to me. I am getting an error though. I have nothing on the page but your code, and I thought the Clob clob; would have prevented this. Am I correct in thinking that the var clob will contain the contents of the file at the completion of the loop? Again, I really appreciate the help you've already given and any additional you can give regarding this error.
    192.      Writer clobWriter = clob.setCharacterStream(0);
    <--->
    *** Error: The variable "clob" may be accessed here before having been definitely assigned a value.
    The code again:
    FileReader frObject = new FileReader("d:\\jrun4\\servers\\test\\test\\Ndadsbload1.txt");
    BufferedReader brObject = new BufferedReader(frObject);
    String line = null;
    String sFile = "";
    Clob clob;
    Writer clobWriter = clob.setCharacterStream(0);
    PrintWriter pw = new PrintWriter(clobWriter);
    while ((line = brObject.readLine()) != null){ 
    pw.println(line);
    }

  • Help with printing a txt file

    Hi, Im having some (a lot) of trouble getting my head round how to actually print a text file.
    Literally i want no formatting, no user interaction or anything, it just has to print a text file, im looking to create a method that is called by another method.
    I know everyone says read the API, however im really not finding it helpfull at all, so if anyone could give me a basic example, or just somewhere to start i'd be really gratefull.
    Thanks
    Alan

    If you are using Java J2SE 6 (which I would recommend unless you have a good reason not too) then it is
    as simple as this.
    import java.awt.Desktop;
    import java.io.File;
    public class Printer {
         public static void main(String[] args) throws Exception {
              Desktop.getDesktop.print(new File("c:\\test.txt"));
    }http://java.sun.com/developer/technicalArticles/J2SE/Desktop/javase6/desktop_api/
    http://java.sun.com/javase/6/docs/api/java/awt/Desktop.html#print(java.io.File)

  • Does no-contract pricing ever make sense?

    As a potential new customer, I'm having trouble figuring out the situations where no-contract iPhones would be a good deal. The need to have AT&T voice/data service locks you in anyway. If you end the contract after only a few months, you've paid more for phone and service than you would for phone under contract with early termination fee. If you use it a long time, you've paid the high initial price and the same monthly charges.
    So when/why would someone logically opt for a no-contract phone?

    Nothing personal, but I couldn't care less why someone would choose to do so. If it falls under the old saying there is a sucker born every minute, then that is the sucker's problem since they can make use of a calculator, paper, and pencil as anyone else can.
    This is way more time than I've spent thinking about this before and I don't plan on spending any more time.

  • Does anyone know how to make a Windows 7 PC into a Wifi Hotspot?

    I have a Windows 7 PC at work and have tried using the Ad-Hoc option to turn my wifi card in my laptop with Internet Connection Sharing to get my iPad, iPhone and MacBook Air online but I have had no sucess.  Googled everything I could and still can't get it to surf the internet.  It will connect but I don't have any internet.  Suggestions?

    If it is a work computer, at work it may be restricted so that you can not turn the lap top into a hot spot for security reaasons. If your company dosn't let guest use their wi fi, it is most likely that they know that their system can be hacked into through unprotected wi fi. You could check with your IT department to determin if this is the case.

  • Why does my converted PDF file show up as code and not in English?

    When I convert my PDF file to word, it shows up in code vs. English.  Parts are in English but most is not.  Any suggestions?

    Hi,
    I am moving your posting at Acrobat.com Forum to ExportPDF Forum.
    I will know more once I see the PDF file, but am assuming that your PDF file was scanned images(OCR could not recognize some images as correct characters) or some encoding issue how PDF was created.
    Please send me your PDF file at below site so that I can review your file.
    https://adobeformscentral.com/?f=qJiclooYWGGNFtWfj8g3wg
    thank you.
    Hisami

  • Use System Proxy Settings - when this is selected in FF v3.6.6, does it adhere to the same local IE proxy setting? We use a pac file configured in "Use automatic configuration script."

    Does anyone know what Firefox looks at locally on the PC when the "Use System Proxy Settings" setting is selected? It appears to be the default setting, recently changed from "No Proxy" of versions past...
    Our company uses a pac file specified in IE under "Use automatic configuration script" - with this new default, does it adhere to the same setting in:
    [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings]

    I may be wrong but I think that the "Use System Proxy Settings" makes sense only on Linux and generally speaking "other OSes". As far as I know there is no generic proxy settings in Windows operating system.
    The one I know is in the registry part of Internet Explorer.
    So in my understanding in Windows, Use System Proxy Settings = No Proxy

Maybe you are looking for

  • Accidentally deleted several FCP Projects

    I'm using FCP X 10.1.1. I've been making simple (uncomplicated) videos and have used a lot of space on my HD. I'm new to the program and I inadvertenly deleted 4 large projects in my FCP library bc I was looking for more disc space. I realized my err

  • Runtime error smartform

    HI experts ,                   I have smartforms for Stock Report. and respective selection screen in se38. while executing its shows Below runtime error. Runtime Errors         CALL_FUNCTION_CONFLICT_LENG Exceptn                CX_SY_DYN_CALL_ILLEGA

  • Setting Up Mobile Accounts to For Users Who Already Exist

    Hi there, I work for a company with about 10 Macs, all laptops, all are on 10.5. They have never had a server and have asked me to set one up for them. I am in the process of setting up a server here with a new copy of OS X Server 10.5. Here's my que

  • How to import data from SQL server to Oracle?

    Dear Sir/Madam, I want to move database data from SQL Server to Oracle, but don't how to do it, will you please help me do it?

  • Ever since I installed Firefox 4, my QuickTime plugin crashes when I view a certain web site.

    This never happened with the previous versions of Firefox. The latest version of the QuickTime plugin is installed. Since posting this, I've updated to Firefox 5. The same problem continues with the newest version.