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

  • SEARCH
  • Home
  • 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 3242628
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T18:20:15+00:00 2026-05-17T18:20:15+00:00

I have a large data-structure which i’m serializing.At certain times i need to edit

  • 0

I have a large data-structure which i’m serializing.At certain times i need to edit the values in the data-structure.But just for changing a small value i’ll have to re-serialize it again instead of updating the changed value in file.I’ve heard of Google protocol buffer’s.Will using it solve my problem of rewriting the file ? Is it a better option for me to use protocol buffer instead of Java serialization ?

  • 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-17T18:20:16+00:00Added an answer on May 17, 2026 at 6:20 pm

    If you care about performance, don’t use a text format for your data. If you want to modify the data without deserializing, you’ll want to use a fixed record data format. You’ll probably have to invent this manually. Then seek to the correct position in the file and rewrite just the changed field. You might look at DataOutputStream to get started or instead use a database such as HSQLDB to store and edit your data.

    Thinking about this more, Unless your objects are very simple, I think a database would be a better way to go.

    More info on DataOutputStream:
    http://download.oracle.com/javase/tutorial/essential/io/datastreams.html

    Java Databases:
    http://java-source.net/open-source/database-engines

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

Sidebar

Related Questions

I have a large tree-like data structure of objects which behave mostly identical but
I have a data structure which consists of pairs of values, the first of
I have a complex data structure (user-defined type) on which a large number of
I have a very large data file with around 60000 rows. I need to
I have a large data structure that is using striping to reduce lock contention.
I'm currently working on a project where we have a large data warehouse which
I have a pretty large tree data structure that will get updated (nodes removed
I need a persistent storage in Java for certain (possibly large) data structures, such
I have a program which creates a C structure which contains large arrays of
I have a large codebase (written by me) that uses the Stack data structure.

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.