• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Regarding serialization

 
Ranch Hand
Posts: 203
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ,

Can any body open and see the contents of the serialized file through Hex editor ...are the serialize files in java are safe ..?
 
Bartender
Posts: 7645
178
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Can any body open and see the contents of the serialized file through Hex editor


You must have tried that and found that it's possible, as it is with any other kind of file.

are the serialize files in java are safe ..?


Serialization is not an encryption. If you want the data to be safe, encrypt the data before writing it to disk.
 
Bartender
Posts: 6109
6
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Saral Saxena wrote:Hi ,

Can any body open and see the contents of the serialized file through Hex editor ...are the serialize files in java are safe ..?



You can see the contents of any file with a hex editor. The question is whether you can understand the contents of that file. For most binary files for most humans, the answer is "no". That's we we use programs that are written to understand specific binary formats, like MS Word, or an MP3 player, etc.

Java's serialized files are no different. You wouldn't be able to understand most of them with a hex editor, but all you need to interpret them and see what they contain is a Java program that does ObjectInputStream.readObject() and then a little reflection to pull out the values of the objects' fields.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic