Convert serialized Java object to human readable

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I have object of class



class X 
private DateTime dt;

"constructor, set/get"



I have one instance of this object serialized in file.bin.



I want to show content of `file.bin on the Linux console in human readable way.










share|improve this question
















bumped to the homepage by Community♦ 8 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.


















    up vote
    0
    down vote

    favorite












    I have object of class



    class X 
    private DateTime dt;

    "constructor, set/get"



    I have one instance of this object serialized in file.bin.



    I want to show content of `file.bin on the Linux console in human readable way.










    share|improve this question
















    bumped to the homepage by Community♦ 8 mins ago


    This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I have object of class



      class X 
      private DateTime dt;

      "constructor, set/get"



      I have one instance of this object serialized in file.bin.



      I want to show content of `file.bin on the Linux console in human readable way.










      share|improve this question















      I have object of class



      class X 
      private DateTime dt;

      "constructor, set/get"



      I have one instance of this object serialized in file.bin.



      I want to show content of `file.bin on the Linux console in human readable way.







      java binary bc ascii hexdump






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 24 '15 at 10:16









      Anthon

      59.4k17100162




      59.4k17100162










      asked Jan 23 '15 at 10:01









      Marcin Tomasik

      13




      13





      bumped to the homepage by Community♦ 8 mins ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







      bumped to the homepage by Community♦ 8 mins ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          You can display the contents of a file with cat, but with binary files that will often result in "garbage". For binary files you can use od -x (or xxd):



          od -x file.bin


          that makes everything byte readable as hex words for any file (understanding what that means is more difficult and dependent on the program that wrote the file, but fortunately that is not what you asked for).






          share|improve this answer






















          • Tiny: od defaults to octal words; for hex bytes use -t x1. Also: Java serialized data is defined mostly by the Java infrastructure and not by the application: see docs.oracle.com/javase/8/docs/platform/serialization/spec/… (or earlier).
            – dave_thompson_085
            Jan 24 '15 at 12:03










          • @dave_thompson_085 Thanks for pointing that out, I'm mostly using xxd, but that doesn't seem to be available everywhere. An application still determines which library/framework/service it uses to write out the binary, few frameworks do anything without an application, so the app IMO still determines what happens (but that is semantics).
            – Anthon
            Jan 24 '15 at 12:26










          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f180610%2fconvert-serialized-java-object-to-human-readable%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          0
          down vote













          You can display the contents of a file with cat, but with binary files that will often result in "garbage". For binary files you can use od -x (or xxd):



          od -x file.bin


          that makes everything byte readable as hex words for any file (understanding what that means is more difficult and dependent on the program that wrote the file, but fortunately that is not what you asked for).






          share|improve this answer






















          • Tiny: od defaults to octal words; for hex bytes use -t x1. Also: Java serialized data is defined mostly by the Java infrastructure and not by the application: see docs.oracle.com/javase/8/docs/platform/serialization/spec/… (or earlier).
            – dave_thompson_085
            Jan 24 '15 at 12:03










          • @dave_thompson_085 Thanks for pointing that out, I'm mostly using xxd, but that doesn't seem to be available everywhere. An application still determines which library/framework/service it uses to write out the binary, few frameworks do anything without an application, so the app IMO still determines what happens (but that is semantics).
            – Anthon
            Jan 24 '15 at 12:26














          up vote
          0
          down vote













          You can display the contents of a file with cat, but with binary files that will often result in "garbage". For binary files you can use od -x (or xxd):



          od -x file.bin


          that makes everything byte readable as hex words for any file (understanding what that means is more difficult and dependent on the program that wrote the file, but fortunately that is not what you asked for).






          share|improve this answer






















          • Tiny: od defaults to octal words; for hex bytes use -t x1. Also: Java serialized data is defined mostly by the Java infrastructure and not by the application: see docs.oracle.com/javase/8/docs/platform/serialization/spec/… (or earlier).
            – dave_thompson_085
            Jan 24 '15 at 12:03










          • @dave_thompson_085 Thanks for pointing that out, I'm mostly using xxd, but that doesn't seem to be available everywhere. An application still determines which library/framework/service it uses to write out the binary, few frameworks do anything without an application, so the app IMO still determines what happens (but that is semantics).
            – Anthon
            Jan 24 '15 at 12:26












          up vote
          0
          down vote










          up vote
          0
          down vote









          You can display the contents of a file with cat, but with binary files that will often result in "garbage". For binary files you can use od -x (or xxd):



          od -x file.bin


          that makes everything byte readable as hex words for any file (understanding what that means is more difficult and dependent on the program that wrote the file, but fortunately that is not what you asked for).






          share|improve this answer














          You can display the contents of a file with cat, but with binary files that will often result in "garbage". For binary files you can use od -x (or xxd):



          od -x file.bin


          that makes everything byte readable as hex words for any file (understanding what that means is more difficult and dependent on the program that wrote the file, but fortunately that is not what you asked for).







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Jan 26 '15 at 7:08

























          answered Jan 24 '15 at 10:11









          Anthon

          59.4k17100162




          59.4k17100162











          • Tiny: od defaults to octal words; for hex bytes use -t x1. Also: Java serialized data is defined mostly by the Java infrastructure and not by the application: see docs.oracle.com/javase/8/docs/platform/serialization/spec/… (or earlier).
            – dave_thompson_085
            Jan 24 '15 at 12:03










          • @dave_thompson_085 Thanks for pointing that out, I'm mostly using xxd, but that doesn't seem to be available everywhere. An application still determines which library/framework/service it uses to write out the binary, few frameworks do anything without an application, so the app IMO still determines what happens (but that is semantics).
            – Anthon
            Jan 24 '15 at 12:26
















          • Tiny: od defaults to octal words; for hex bytes use -t x1. Also: Java serialized data is defined mostly by the Java infrastructure and not by the application: see docs.oracle.com/javase/8/docs/platform/serialization/spec/… (or earlier).
            – dave_thompson_085
            Jan 24 '15 at 12:03










          • @dave_thompson_085 Thanks for pointing that out, I'm mostly using xxd, but that doesn't seem to be available everywhere. An application still determines which library/framework/service it uses to write out the binary, few frameworks do anything without an application, so the app IMO still determines what happens (but that is semantics).
            – Anthon
            Jan 24 '15 at 12:26















          Tiny: od defaults to octal words; for hex bytes use -t x1. Also: Java serialized data is defined mostly by the Java infrastructure and not by the application: see docs.oracle.com/javase/8/docs/platform/serialization/spec/… (or earlier).
          – dave_thompson_085
          Jan 24 '15 at 12:03




          Tiny: od defaults to octal words; for hex bytes use -t x1. Also: Java serialized data is defined mostly by the Java infrastructure and not by the application: see docs.oracle.com/javase/8/docs/platform/serialization/spec/… (or earlier).
          – dave_thompson_085
          Jan 24 '15 at 12:03












          @dave_thompson_085 Thanks for pointing that out, I'm mostly using xxd, but that doesn't seem to be available everywhere. An application still determines which library/framework/service it uses to write out the binary, few frameworks do anything without an application, so the app IMO still determines what happens (but that is semantics).
          – Anthon
          Jan 24 '15 at 12:26




          @dave_thompson_085 Thanks for pointing that out, I'm mostly using xxd, but that doesn't seem to be available everywhere. An application still determines which library/framework/service it uses to write out the binary, few frameworks do anything without an application, so the app IMO still determines what happens (but that is semantics).
          – Anthon
          Jan 24 '15 at 12:26

















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f180610%2fconvert-serialized-java-object-to-human-readable%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Bahrain

          Postfix configuration issue with fips on centos 7; mailgun relay