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 -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -