android: Also support writing of 24-bit values

This commit is contained in:
Tobias Brunner
2013-07-08 18:49:27 +02:00
parent 5c9706f30b
commit 75d710ec63
@@ -134,6 +134,19 @@ public class BufferedByteWriter
return this;
}
/**
* Write 24-bit of the given value in big-endian order to the buffer
* @param value
* @return the writer
*/
public BufferedByteWriter put24(int value)
{
ensureCapacity(3);
mWriter.put((byte)(value >> 16));
mWriter.putShort((short)value);
return this;
}
/**
* Write the given int value (32-bit) in big-endian order to the buffer
* @param value