I\'m trying to write TIFF IFDs, and I\'m looking for a simple way to do the following (this code obviously is wrong but it gets the idea across of what I want):
Maybe you should try something like this:
ByteBuffer buffer = ByteBuffer.allocate(1000); buffer.order(ByteOrder.LITTLE_ENDIAN); buffer.putChar((char) 12); buffer.putChar((char) 259); buffer.putChar((char) 3); buffer.putInt(1); buffer.putInt(1); byte[] bytes = buffer.array();