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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T23:28:59+00:00 2026-05-22T23:28:59+00:00

In my application perticular message structure/format are send and received. When I have to

  • 0

In my application perticular message structure/format are send and received. When I have to send the message, the message should be created on the particular format. I have parse message on perticular message. The message nothing but byte array

To parse the message I have used Preon lib.

I have following problem with :

  1. Programatically I have to create the byte array for each field.
  2. When message format get changed I have to change the code.

How can I construct run time message structure and parse the message structure.

The message structure look like this

Message1{

int field_1
char[2] field_2
long filed_3 
double filed_4
bit field_5
short field_6
char field_7

}


Message2{

    Message1 msg
    short field_8
    char field_9
}
  1. Message structure will be change any time.

  2. There are more than 1000 types of messages in the system.

So I am looking for solution in java which will create message and parse from given structure runtime.

If you have sample code, please provide the code sniipet.

  • 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-22T23:29:00+00:00Added an answer on May 22, 2026 at 11:29 pm

    I would use an OSGi container (karaf/iPOJO) which allows me to change the code while the application is running. This means you can add fields, change their type and size while the system without bringing down the application.

    Note: if you add a field or make a field larger but the code doesn’t support it won’t you lose information?

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

Sidebar

Related Questions

I have a particular application that needs to calculate something very specific, and while
I like Django, but for a particular application I would like to use only
I have a particular web application that like most others, has to account for
I have an application in which when i click on a particular tab an
In the application I am developing I have to store the time some particular
I have an asp.net application for which I need to expose a particular subdirectory
Is it possible to move a message from the application into inbox? I have
I use the Message Queue to send messages from one application to the other
I have written a PHP application that broadcasts a voice message to phone numbers
I have an application the sets up the logging using: logging.basicConfig(level=logging_level, format=format_string, filename=log_file, filemode='a')

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.