public static void writeBinary(final ByteBuffer buf,
                                       final Bytes key,
                                       final long startTime,
                                       final long endTime) {
            buf.putLong(endTime);
            buf.putLong(startTime);
            if (key != null) {
                buf.put(key.get());
            }
        }
@param key the key in the range
@param from the earliest end timestamp in the range
streams/src/main/java/org/apache/kafka/streams/state/internals/PrefixedSessionKeySchemas.java