- Sort Score
- Num 10 results
- Language All
Results 11 - 20 of 143 for contentLength (0.08 seconds)
-
okhttp/src/jvmTest/kotlin/okhttp3/ResponseBodyJvmTest.kt
fun stringClosesUnderlyingSource() { val closed = AtomicBoolean() val body: ResponseBody = object : ResponseBody() { override fun contentType(): MediaType? = null override fun contentLength(): Long = 5 override fun source(): BufferedSource { val source = Buffer().writeUtf8("hello") return object : ForwardingSource(source) { @Throws(IOException::class)
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Wed Mar 19 19:25:20 GMT 2025 - 12.4K bytes - Click Count (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http/RealResponseBody.kt
* by malformed content types. */ private val contentTypeString: String?, private val contentLength: Long, private val source: BufferedSource, ) : ResponseBody() { override fun contentLength(): Long = contentLength override fun contentType(): MediaType? = contentTypeString?.toMediaTypeOrNull() override fun source(): BufferedSource = source
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Fri Dec 27 13:39:56 GMT 2024 - 1.2K bytes - Click Count (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/MultipartBody.kt
} // We can't measure the body's size without the sizes of its components. val contentLength = body.contentLength() if (contentLength == -1L && countBytes) { byteCountBuffer!!.clear() return -1L } sink.write(CRLF) if (countBytes) { byteCount += contentLength } else { body.writeTo(sink) } sink.write(CRLF) }Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Wed Mar 19 19:25:20 GMT 2025 - 10.9K bytes - Click Count (0) -
compat/maven-embedder/src/main/java/org/apache/maven/cli/transfer/Slf4jMavenTransferListener.java
.append(resource.getResourceName()) .append(" ("); format.format(message, contentLength); long duration = System.currentTimeMillis() - resource.getTransferStartTime(); if (duration > 0L) { double bytesPerSecond = contentLength / (duration / 1000.0); message.append(" at "); format.format(message, (long) bytesPerSecond);
Created: Sun Apr 05 03:35:12 GMT 2026 - Last Modified: Fri Nov 08 08:49:11 GMT 2024 - 3.8K bytes - Click Count (0) -
impl/maven-cli/src/main/java/org/apache/maven/cling/transfer/Slf4jMavenTransferListener.java
.append(" ("); format.format(message, contentLength); Duration duration = Duration.between(Instant.ofEpochMilli(resource.getTransferStartTime()), MonotonicClock.now()); if ((duration.getSeconds() | duration.getNano()) > 0) { // duration.isPositive() long bytesPerSecond = Math.round(contentLength / (double) duration.toSeconds()); message.append(" at ");
Created: Sun Apr 05 03:35:12 GMT 2026 - Last Modified: Thu Dec 12 11:02:17 GMT 2024 - 4K bytes - Click Count (0) -
src/main/java/org/codelibs/fess/app/web/api/admin/documents/ApiAdminDocumentsAction.java
Created: Tue Mar 31 13:07:34 GMT 2026 - Last Modified: Thu Jul 17 08:28:31 GMT 2025 - 8.3K bytes - Click Count (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http1/Http1ExchangeCodec.kt
} response.isChunked -> { newChunkedSource(response.request.url) } else -> { val contentLength = response.headersContentLength() if (contentLength != -1L) { newFixedLengthSource(response.request.url, contentLength) } else { newUnknownLengthSource(response.request.url) } } }Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Jan 27 09:00:39 GMT 2026 - 17.6K bytes - Click Count (7) -
impl/maven-cli/src/main/java/org/apache/maven/cling/transfer/AbstractMavenTransferListener.java
message.style(STYLE).append(" (").append(format.format(contentLength)); Duration duration = Duration.between(resource.getStartTime(), MonotonicClock.now()); long nanos = duration.toNanos(); if (nanos > 0) { double seconds = nanos / (double) TimeUnit.SECONDS.toNanos(1); // Convert to fractional seconds double bytesPerSecond = contentLength / seconds; message.append(" at ");
Created: Sun Apr 05 03:35:12 GMT 2026 - Last Modified: Tue Apr 22 22:13:51 GMT 2025 - 4.3K bytes - Click Count (0) -
docs/recipes.md
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Sun Mar 15 09:01:42 GMT 2026 - 47.8K bytes - Click Count (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/RequestBody.kt
/** * Returns the number of bytes that will be written to sink in a call to [writeTo], * or -1 if that count is unknown. */ @Throws(IOException::class) open fun contentLength(): Long = -1L /** Writes the content of this request to [sink]. */ @Throws(IOException::class) abstract fun writeTo(sink: BufferedSink) /**
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Oct 07 14:16:29 GMT 2025 - 9.3K bytes - Click Count (0)