Mapping java variables data to C Structures and write a c compatible file -


i have java class file 3 arraylists, 1 type string, 1 type integer , other arraylist type (arraylist(string)). have write these these arraylists structure in c character arrays, integers , short , output file in specefic format extension. file has readable again same application. best way trasnfer data java c structure , output c structure in file. thank you

there no "c compatible file" format. if have c structs written disk file directly, in ad-hoc binary format. exact format depends on things packing , padding of struct, byte order, word size of cpu (like, 32 or 64 bit), etc.

so, start defining format, forget produced c.

once have format defined, can write program parse in java. if short fixed length records, i'd create class, internally has private byte[] array, , methods manipulate it, save , load it.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -