android - How to save an array of floats and shorts in byte to disk in java? -


i have 2 arrays i'd save file. array of floats , array of shorts (mesh data). don't want save these characters because makes files unnecessarily large. file loaded both android , ios bytebuffer.nativeorder thing makes me nervous. suggestions, tips, warnings appreciated.

float verts[x]

short indices[y]

i'd use dataoutputstream - write out number of vertices, vertices themselves. write out number of indices, indices.

this use big-endianness, , should easy enough read/write on ios, without worrying native byte ordering.


Comments

Popular posts from this blog

python - TypeError: start must be a integer -

html - href attribute breaking an element -

html - How can i make an element from a bottom stacking context stays in front of another higher stacking context? -