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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T13:58:23+00:00 2026-06-05T13:58:23+00:00

I have a spreadsheet application in Java, and one of the features it provides

  • 0

I have a spreadsheet application in Java, and one of the features it provides (which I developed) is sheet sharing. Basically, anyone can be a client or a server because the app has both server and client code. The user who is the server creates the share, specifies the IP, and then the share is created and active (best case scenario) with the server listening for clients on its IP and selected port.

For auto-discovery, I am using DatagramSockets via UDP broadcasts, while the ‘real communication’ is TCP-based (after the client is already connected). However, I’m trying to send a List through that UDP socket and I don’t know how to do it. That List contains the active shares on the server that I need to send to the client so it knows what it can connect to.

It goes like this:

Client -> looks for active servers by sending a packet to the network -> server listens and sends a packet back. This packet should be the List (if it is possible to send it via these kind of sockets).

Can anyone shed some light on my question? Thank you.

  • 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-06-05T13:58:25+00:00Added an answer on June 5, 2026 at 1:58 pm

    You can convert your List to a byte[] before sending, and convert it back to a List on the reciever using Java Serialization.

        // Sender
        List list = new ArrayList();
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        ObjectOutputStream outputStream = new ObjectOutputStream(out);
        outputStream.writeObject(list);
        outputStream.close();
    
        byte[] listData = out.toByteArray();
    
    
        // Reciever
        ObjectInputStream inputStream = new ObjectInputStream(new ByteArrayInputStream(listData));
        list = inputStream.readObject();
    

    Just make sure all the objects you put in your List implements Serializable.

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

Sidebar

Related Questions

I have an Excel spreadsheet which is one sheet with a table and chart
I have an application that uses COM interop to create a spreadsheet which is
I have a web application which provides Excel files via IE 7. It requests
I have an existing business application written in Excel which the client would like
I have a Delphi application which reads data from an excel spreadsheet using code
I have an excel spreadsheet with two columns, one with a list of exercises
All, I wrote a spreadsheet application which users load it by doubleclicking an icon
I have a bunch of data that I'm pulling into my application which frankly
I have an application in turbogears that dynamically generates an excel spreadsheet, meaning it
I have an application written in VB6 that writes data to a spreadsheet. I'm

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.