- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 39 for inline (0.27 sec)
-
okhttp/src/test/java/okhttp3/RequestBodyTest.kt
assertThat(buffer.readUtf8()).isEqualTo("Hello") } } private inline fun <T> assertOnFileDescriptor( content: String? = null, fn: (FileDescriptor) -> T, ): T { return assertOnPath(content) { FileInputStream(filePath.toFile()).use { fis -> fn(fis.fd) } } } private inline fun <T> assertOnPath( content: String? = null, fn: (okio.Path) -> T,
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 3.6K bytes - Viewed (1) -
okhttp/src/main/kotlin/okhttp3/Interceptor.kt
companion object { /** * Constructs an interceptor for a lambda. This compact syntax is most useful for inline * interceptors. * * ```kotlin * val interceptor = Interceptor { chain: Interceptor.Chain -> * chain.proceed(chain.request()) * } * ``` */ inline operator fun invoke(crossinline block: (chain: Chain) -> Response): Interceptor = Interceptor { block(it) } }
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 3.5K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/-UtilJvm.kt
@Suppress("PLATFORM_CLASS_MAPPED_TO_KOTLIN", "NOTHING_TO_INLINE") internal inline fun Any.wait() = (this as Object).wait() @Suppress("PLATFORM_CLASS_MAPPED_TO_KOTLIN", "NOTHING_TO_INLINE") internal inline fun Any.notify() = (this as Object).notify() @Suppress("PLATFORM_CLASS_MAPPED_TO_KOTLIN", "NOTHING_TO_INLINE") internal inline fun Any.notifyAll() = (this as Object).notifyAll()
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Tue Jan 09 12:33:05 GMT 2024 - 10.5K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/idn/IdnaMappingTable.kt
* 119 : Ignored. * 120 : Valid. * 121 : Disallowed * 122 : Mapped inline to the sequence: [b2]. * 123 : Mapped inline to the sequence: [b2a]. * 124 : Mapped inline to the sequence: [b2, b3]. * 125 : Mapped inline to the sequence: [b2a, b3]. * 126 : Mapped inline to the sequence: [b2, b3a]. * 127 : Mapped inline to the sequence: [b2a, b3a]. * * The range goes until the beginning of the next range. *
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Tue Apr 02 11:39:58 GMT 2024 - 9K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/connection/Locks.kt
*/ internal object Locks { inline fun <T> Dispatcher.withLock(action: () -> T): T { contract { callsInPlace(action, InvocationKind.EXACTLY_ONCE) } return lock.withLock(action) } inline fun <T> RealConnection.withLock(action: () -> T): T { contract { callsInPlace(action, InvocationKind.EXACTLY_ONCE) } return lock.withLock(action) } inline fun <T> RealCall.withLock(action: () -> T): T {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Apr 20 17:03:43 GMT 2024 - 2.1K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/internal/concurrent/TaskFaker.kt
* * By completing. */ class TaskFaker : Closeable { @Suppress("NOTHING_TO_INLINE") internal inline fun Any.assertThreadHoldsLock() { if (assertionsEnabled && !taskRunner.lock.isHeldByCurrentThread) { throw AssertionError("Thread ${Thread.currentThread().name} MUST hold lock on $this") } } @Suppress("NOTHING_TO_INLINE") internal inline fun Any.assertThreadDoesntHoldLock() {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Apr 29 00:33:04 GMT 2024 - 12.6K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/concurrent/TaskQueue.kt
taskRunner.kickCoordinator(this) } } } /** * Overload of [schedule] that uses a lambda for a repeating task. * * TODO: make this inline once this is fixed: https://github.com/oracle/graal/issues/3466 */ fun schedule( name: String, delayNanos: Long = 0L, block: () -> Long, ) { schedule( object : Task(name) {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 7.5K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/Request.kt
fun headers(name: String): List<String> = commonHeaders(name) /** Returns the tag attached with [T] as a key, or null if no tag is attached with that key. */ @JvmName("reifiedTag") inline fun <reified T : Any> tag(): T? = tag(T::class) /** Returns the tag attached with [type] as a key, or null if no tag is attached with that key. */ fun <T : Any> tag(type: KClass<T>): T? = type.java.cast(tags[type])
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Apr 06 04:17:44 GMT 2024 - 10.5K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/-UtilCommon.kt
return ( readByte() and 0xff shl 16 or (readByte() and 0xff shl 8) or (readByte() and 0xff) ) } /** Run [block] until it either throws an [IOException] or completes. */ internal inline fun ignoreIoExceptions(block: () -> Unit) { try { block() } catch (_: IOException) { } } internal fun Buffer.skipAll(b: Byte): Int { var count = 0 while (!exhausted() && this[0] == b) {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 11K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/-ResponseBodyCommon.kt
internal fun ResponseBody.commonBytes() = commonConsumeSource(BufferedSource::readByteArray) { it.size } internal fun ResponseBody.commonByteString() = commonConsumeSource(BufferedSource::readByteString) { it.size } internal inline fun <T : Any> ResponseBody.commonConsumeSource( consumer: (BufferedSource) -> T, sizeMapper: (T) -> Int, ): T { val contentLength = contentLength() if (contentLength > Int.MAX_VALUE) {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 2.3K bytes - Viewed (0)