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 6861241
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:30:35+00:00 2026-05-27T02:30:35+00:00

I am building a framework for my day-to-day tasks. I am programming in scala

  • 0

I am building a framework for my day-to-day tasks. I am programming in scala using a lot of type parameter.

Now my goal is to save datastructures to files (e.g. xml files). But I realized that it is not possible using xml files. As I am new to this kind of problem I am asking:

Is there a way to store the types of my datastructures in a file??? Is there a way in scala???

  • 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-27T02:30:36+00:00Added an answer on May 27, 2026 at 2:30 am

    Okay guys. You did a great job basicly by naming the thing I searched for.

    Its serialization.

    With this in mind I searched the web and was completly astonished by this feature of java.
    Now I do something like:

    object Serialize {
    
      def write[A](o: A): Array[Byte] = {
        val ba = new java.io.ByteArrayOutputStream(512)
        val out = new java.io.ObjectOutputStream(ba)
        out.writeObject(o)
        out.close()
        ba.toByteArray()
      }
    
      def read[A](buffer: Array[Byte]): A = {
        val in = new java.io.ObjectInputStream(new java.io.ByteArrayInputStream(buffer))
        in.readObject().asInstanceOf[A]
      }
    }
    

    The resulting Byte-Arrays can be written to a file and everthing works well.

    And I am totaly fine that this solution is not human readable. If my mind changes someday. There are JSON-parser allover the web.

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

Sidebar

Related Questions

I'm considering building a framework for VB.NET, and using the My namespace to plug
We are currently building the framework for developing a C# .net application using visual
I am building a form in Zend Framework 1.9 using subforms as well as
I am building a framework where people will be able to save items that
I have some* experience using the flex framework for building web apps. But I
I am building a modular framework for a PHP MVC site. I am using
I'm building my own framework, and I'm trying to pass a parameter to a
I'm building a paid membership site in php using the Zend Framework. I need
I am building an MVC framework. I am using the PEAR naming convention. Classes
I am building a reusable framework for building scheduling services using the .NET Framework.

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.