/** * Render this header to a byte buffer. * * @param buf The target buffer. */ public void render(ByteBuffer buf) { buf.put(BinaryFormat.HEADER_MAGIC); buf.putShort(format.getFlagWord()); buf.putInt(ratingCount); buf.putInt(userCount); buf.putInt(itemCount); }