List of usage examples for org.apache.commons.io EndianUtils writeSwappedInteger
public static void writeSwappedInteger(byte[] data, int offset, int value)
From source file:ch.threema.apitool.messages.ImageMessage.java
@Override public byte[] getData() { byte[] data = new byte[BLOB_ID_LEN + 4 + NaCl.NONCEBYTES]; int pos = 0;/*w w w . jav a 2 s .c o m*/ System.arraycopy(this.blobId, 0, data, pos, BLOB_ID_LEN); pos += BLOB_ID_LEN; EndianUtils.writeSwappedInteger(data, pos, this.size); pos += 4; System.arraycopy(this.nonce, 0, data, pos, NaCl.NONCEBYTES); return data; }