withClear

inline fun <T : Buffer> T.withClear(): T

Utility function wrapping the Buffer.clear call on older JDKs where it always returns a plain Buffer instead of the correct type