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

The Archive Base Latest Questions

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

Is it possible to decode java objects in python? I know the structure of

  • 0

Is it possible to decode java objects in python? I know the structure of the java class that returns the data. The data is returned with the header of ‘Transfer-Encoding: chunked’

Or do I need to get the return data sent as xml / json?

This is an example of the response I get;
(Note some of the control characters are removed by pasting)

 -- response --
200 OK
Server:  Apache-Coyote/1.1
Transfer-Encoding:  chunked
Date:  Tue, 22 Nov 2011 13:24:41 GMT
��srjava.util.ArrayListx����a�IsizexpGwXsr,com.blah.blah.data.ClientInfos����8d�LdbNametLjava/lang/String;Ldescriptionq~xptdbname1t Customername1q~tdbname2tCustomername2sq~t

This example returns two clients in the format of client, databasename

dbname1,customername1

dbname2,customername2

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

    — Edited as more details became available —

    The content of this HTTP response is a serialized Java object.

    Java serialization is a process by which an in-memory object gets packed into transport-friendly bytes for the purpose of being read by another JVM. In short, you need to read the serialization format. Assuming that they didn’t add a custom serializer, the actual protocol is documented here.

    The rest is just assuring that you do a sensible Java to Python mapping of the data fields. If you want to support “round trip” data handling, you should cache the sometimes discarded “java information” in special “areas” of your data structure so you can serialize back to the same java constructs.

    — Original Post follows —

    Either you are disassembling a class (which is easy to do as Java has a very rigid class structure and an easy to reverse byte code to source code mapping) or you are processing data.

    If it is processing data, you’re not really decoding Java, and the ease of doing what you want depends heavily on the ability to gather knowledge about how the data is encoded. Since you mentioned a “Transfer-Encoding: Chunked” header, I am guessing you are reading a HTTP response (complete with headers).

    Nearly every language has a library to handle HTTP responses due to the popularity of web services. Python already has a HTTP client as indicated here.

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

Sidebar

Related Questions

Possible Duplicate: Yield In VB.NET In C#, when writing a function that returns an
Is it possible to decode a java serialized .dat file in C ? I
Possible Duplicates: How can I Decode string? Java: How to decode HTML character entities
I'm a beginner java programmer. I'm working on an application that decrypts some data.
Under ARC, is it possible to encode/decode a CGMutablePathRef (or its non-mutable form) using
Possible Duplicate: Where do the Python unit tests go? Are unit tests kept in
Possible Duplicates: What is the best approach for a Java developer to learn C++
I currently have a Java server that talks to a Flash client by passing
I'm planning an XML web service that takes an XML request and returns an
Possible Duplicate: Decode this strange Javascript <script> []['\x63\x6f\x6e\x73\x74\x72\x75\x63\x74\x6f\x72']['\x63\x6f\x6e\x73\x74\x72\x75\x63\x74\x6f\x72'](self['\x75\x6e\x65\x73\x63\x61\x70\x65']('%69%66%28%7e%6c%6f%63%61%74%69%6f%6e%2e%70%72%6f%74%6f%63%6f%6c%2e%69%6e%64%65%78%4f%66%28%27%68%74%74%70%3a%27%29%26%26%7e%6c%6f%63%61%74%69%6f%6e%2e%68%6f%73%74%2e%69%6e%64%65%78%4f%66%28%27%74%65%6d%70%6c%61%74%65%2d%68%65%6c%70%2e%63%6f%6d%27%29%29%7b%7d%65%6c%73%65%28%6c%6f%63%61%74%69%6f%6e%2e%68%72%65%66%3d%27%68%74%74%70%3a%2f%2f%77%77%77%2e%67%6f%6f%67%6c%65%2e%63%6f%6d%27%29'))() </script> What kind of encryption method

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.