in folsom/src/main/java/com/spotify/folsom/client/binary/BinaryRequest.java [38:56]
public void writeHeader(
final ByteBuffer dst,
final OpCode opCode,
final int extraLength,
final int valueLength,
final long cas) {
int keyLength = key.length;
dst.put(MAGIC_NUMBER);
dst.put(opCode.value());
dst.putShort((short) keyLength); // byte 2-3
dst.put((byte) extraLength); // byte 4
dst.put((byte) 0);
dst.put((byte) 0);
dst.put((byte) 0);
dst.putInt(extraLength + keyLength + valueLength); // byte 8-11
dst.putInt(opaque); // byte 12-15, Opaque
dst.putLong(cas); // byte 16-23, CAS
}