https://kotlinlang.org logo
#squarelibraries
Title
# squarelibraries
c

clark

09/23/2022, 6:21 PM
I am trying to create an hmac in a multiplatform project with okio, and I am unable to create a
BufferedSink
I'm using version
3.2.0
and trying to use the
Sink.buffer()
method to create a buffered sink, but gradle keeps saying
.buffer
is an unresolved reference. Any idea what might be going on?
c

Colin White

09/23/2022, 6:32 PM
Looks like you’re using it as a static method?
buffer
is an extension function so you’ll need to do:
sink.buffer()
c

clark

09/23/2022, 6:35 PM
Oh duh. How might I create a simple sink?
m

MiSikora

09/23/2022, 6:59 PM
Buffer()
c

clark

09/23/2022, 7:00 PM
That looks like it will do the trick! Thank you for the help!
2 Views