Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 1 of 1

Thread: Re: data and object streams

  1. #1
    Junior Member
    Join Date
    Mar 2014
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: data and object streams

    So as I understand it in newbie speak if I wanted to store the stats from a ball game I could use a datastream to store the data as:

    InningScore {1,2,3,4,5,6,7,8,9}
    TeamA {0,1,0,2,1,2,3,2,1}
    TeamB {0,2,1,4,5,1,2,3,4}

    Or you could store as an objectstream storing multiple inning objects
    newInning {int gameid, int inning, int tm_a_score, int tm_b_score}

    Either way you could store an indefinite number of innings, and then use the program to repeatedly track the data in a form of database.

    The difference that each objectstream has to have its structure stored and reconstructed. Whereas the datastreams can be stored separately without that overhead.

    Someone asked when would I use the object stream. I would ask for an example of a mixed instance, or a perfect instance for either or where you would not want to use an objectstream or datastream

    There aren't alot of good posts on the net that break the two down and contrast them The oracle tutorial was horrid. I wound up getting a hold of a real text since my java class didn't provide a real one

    I also understand that my datastreams were all int streams and that I could have had other datatypes.

    Would you blend the two?
    Last edited by starlord; March 18th, 2014 at 12:22 PM. Reason: improve wording


Similar Threads

  1. Delete data from inside the object
    By ankityadav in forum What's Wrong With My Code?
    Replies: 13
    Last Post: September 5th, 2013, 10:11 AM
  2. [SOLVED] what data type should i use in MySql for a java object to be saved
    By chronoz13 in forum JDBC & Databases
    Replies: 4
    Last Post: October 9th, 2011, 08:17 AM
  3. Could not create Audio Data object
    By chronoz13 in forum File I/O & Other I/O Streams
    Replies: 0
    Last Post: July 12th, 2011, 12:29 PM
  4. Reading data from a text file into an object
    By surfbumb in forum What's Wrong With My Code?
    Replies: 1
    Last Post: April 6th, 2011, 09:37 PM
  5. data and object streams
    By bbr201 in forum Java Theory & Questions
    Replies: 4
    Last Post: July 16th, 2010, 07:18 PM