Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7690341
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T20:22:24+00:00 2026-05-31T20:22:24+00:00

I am working on a project for my advanced Java class, and the assignment

  • 0

I am working on a project for my advanced Java class, and the assignment says he wants us
to send an object to a file, which is easy enough, but that he also wants the file to be human readable and editable. I sent him an e-mail 3 days ago and he hasn’t responded, so
I am kind of stuck between a rock and hard place since the project is due in 3 days.

So would any of you clever programmers be able to fill me in on the secret that apparently I am left out of.

How do you send an object to a file that reads like English?

I want to have the ability to both read and write a to-do item to a
file. I see our application looking like:

  1. When it first starts, the program asks the user if there is a file containing to-do items. If so, the user will name the file, the
    program will read it in and continue.
  2. When the user decides to exit, the program will prompt the user – to ask if the to-do items should be saved to a file – if so, the
    user will name the file and the program will write them out in
    such a fashion that it can read them in again.

I want these file to be human readable (and editable). No binary data.
No counting. My advice to you would be to have a method somewhere that
looked like:

public ToDoItem getToDoItem(FileInputStream fis) {
   // ...
}

and

public void writeToDoItem(FileOutputStream fos) {
 // ...
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T20:22:25+00:00Added an answer on May 31, 2026 at 8:22 pm

    Think how you would represent an object on paper in such a way that it could be reconstructed unambiguously. You’d probably list the class name, then you’d list each field name and its current value. If the field was a primitive, the value would be just the primitive value. If it was a reference type, you’d represent the object recursively using this procedure. If it was an array, you’d list each element value.

    There are various standard ways of formatting such a representation (XML and JSON to name a couple). The key is to make it a text-only representation so it is human-readable.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a Java project where I have created a class that looks
I'm working on a extremely basic Java video player project which is my coursework.
While working a project tonight, I ended up using one .js resource file for
I am working on project in Linux which involves 1) Static Lib in C++
I am working on project -online file management where we have to tore file
I'm working on a maven project which uses seam 2.2.0, hibernate 3.5.0-CR-2 as JPA
I'm working on a project where I'd like users to experiment with Java classes
I am currently working on a Java EE project. I have successfully developed a
I'm working on an existing Java EE project with various maven modules that are
Me and a group of friends are working on a project in Java, and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.