jw
12/20/2017, 1:32 AMeric
12/20/2017, 1:33 AMbdawg.io
12/27/2017, 11:12 PMbdawg.io
12/27/2017, 11:14 PMsinkA.writeAll(source)
sinkB.writeAll(source)
but I’m guessing that the source will be exhausted before sinkB
can write the contents?jw
12/28/2017, 12:46 AMjw
12/28/2017, 12:49 AMbdawg.io
12/28/2017, 5:15 AMfun BufferedSource.copyTo(vararg buffers: BufferedSink): Array<out BufferedSink> {
val SIZE = 8192
val segment = ByteArray(SIZE)
while (!exhausted()) {
val bytesRead = read(segment, 0, SIZE)
buffers.forEach { it.write(segment, 0, bytesRead) }
}
return buffers
}
bdawg.io
12/28/2017, 5:18 AMjw
12/28/2017, 4:02 PMjw
12/28/2017, 4:02 PMbdawg.io
01/04/2018, 1:00 AMJsonDataException
?
data class Foo(val bar: Boolean) {
init {
require(bar == false)
}
}
val adapter = moshi.adapter(Foo::class.java)
jw
01/04/2018, 1:02 AMbdawg.io
01/04/2018, 1:04 AMThrown when the data in a JSON document doesn’t match the data expected by the caller.
jw
01/04/2018, 1:05 AMbdawg.io
01/04/2018, 11:05 PMjava.lang.IllegalArgumentException: unexpected owner type for class my.type.RequestContent$Full: null
eric
01/04/2018, 11:07 PMTypes.newParameterizedTypeWithOwner
is what you're looking for (RequestContent is the owner)eric
01/04/2018, 11:08 PMbdawg.io
01/04/2018, 11:15 PM.newParameterizedType(RequestContent::class.java, RequestContent.Full::class.....
and get java.lang.IllegalArgumentException: Expected a Class, ParameterizedType, or GenericArrayType, but <null> is of type null
I’m assuming that’s probably related to that issuebdawg.io
01/04/2018, 11:16 PMeric
01/04/2018, 11:16 PMeric
01/04/2018, 11:16 PMbdawg.io
01/04/2018, 11:18 PMKotlinJsonAdapterFactory
only available in Moshi 1.5.0+?eric
01/04/2018, 11:18 PMhmole
02/09/2018, 1:06 PMsqldelight
with SupportSQLiteDatabase
rolling out?jw
02/09/2018, 2:22 PMjw
02/13/2018, 4:32 AMhmole
02/14/2018, 11:28 AMsqlbrite
when using SqlDelightStatement
?jw
02/14/2018, 1:26 PMhmole
02/15/2018, 10:13 AMsendTableTrigger
. It's package private. Do I have to run dummy sql in executeAndTrigger
for this?