I wrote a .obj parser in java to simulate 3D objects on an iPhone. I would like to export the data as a binary file, which should be as small as possible. I have many indexes that will correspond to unsigned short sign, but they are represented as int in java.
I would like to use the ByteBuffer class to convert just before writing data to a file. I suppose I will have to manipulate bytes before pushing them into ByteBuffer, but I have no idea how to do this.
Thanks in advance if you can help me.
source share