serialization - Partial deserialization of a huge binary file - Java -


this first question stackoverflow. please let me know if question not clear , need more details.

i have class has 3 attributes this:

 class sampleclass { long [] field1; float[] field2; float[] field3; } 

a huge sampleclass object built(with billion entries each array). object serialized in 1 host , serialized file uploaded machine. want deserialize portion of file can smaller sampleclass object 10 indices filled each field , not complete object. because machine not have enough capacity load such huge object in memory. possible?

the object serialized using java's writeobject method , done different utility , have no control on it. in advance.

forget using java serialization api - it's designed deserialize everything. if have no control on how serialized file generated, should consider parsing serialized file , extracting necessary parts - it's not hard.

the java serialization format well-documented (see e.g. official docs, informative article), , tools exist parse format (e.g. serialysis, jdeserialize) though isn't particularly hard write own tool based on format spec.

once can parse serialized data, can extract need , skip on don't need.


Comments

Popular posts from this blog

How to connect android app to App engine -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

php - display validation error message next to the textbox in codeigniter -