Convert serialized Java object to human readable
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.
java binary bc ascii hexdump
add a comment |
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.
java binary bc ascii hexdump
add a comment |
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.
java binary bc ascii hexdump
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
java binary bc ascii hexdump
edited Jan 24 '15 at 10:16
Anthon
59.9k17102163
59.9k17102163
asked Jan 23 '15 at 10:01
Marcin Tomasik
13
13
add a comment |
add a comment |
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).
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 usingxxd
, 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
add a comment |
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).
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 usingxxd
, 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
add a comment |
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).
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 usingxxd
, 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
add a comment |
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).
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).
edited Jan 26 '15 at 7:08
answered Jan 24 '15 at 10:11
Anthon
59.9k17102163
59.9k17102163
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 usingxxd
, 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
add a comment |
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 usingxxd
, 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
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown