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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T08:36:03+00:00 2026-06-05T08:36:03+00:00

I have to transfer some records over TCP though sockets. I used ObjectInputStream and

  • 0

I have to transfer some records over TCP though sockets. I used ObjectInputStream and ObjectOutputStream and it worked fine. One critical think is that the socket is opened once and has to remain open through the whole communication but each side reads and writes more than once (so it more like a persistent connection).

I tried to compress the Objects before writing them in order to increase the overall performance and the results were quite encouraging but, since I used GZIPOutputStream and ByteArrayOutputStream, the memory overhead is too large and in some case I get OutOfMemory error.

I tried DeflaterOutputStream but it didn’t seem apropriate for writting objects.
Is there any way to solve this problem?

  • 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-05T08:36:04+00:00Added an answer on June 5, 2026 at 8:36 am

    Java serialization is convenient, but rather ineffective both size-wise and in CPU usage. If you want high performance, suggest you use a completely different communication protocol, for example based on Protocol Buffers or something else light-weight.

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

Sidebar

Related Questions

I have to transfer some values to be used as commands over the network,
I'd like to transfer a file plus some additional data over a tcp socket.
i have a task to transfer text files from one pc to another using
I have a class that uses XStream and is used as a transfer format
I have used JSON::Any in my program to transfer the hash between client and
I have some txt files that contain tables with a mix of different records
some how i manage to have jquery transfer effect working with jquery dialog but
I have 2 azure sql db and I've created SSIS job to transfer some
I have to transfer ~100MB of data over ServerSocket using NIO, but I can't
I have some image files in server. I need to move or transfer the

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.