- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 247 for IOException (0.2 sec)
-
samples/unixdomainsockets/src/main/java/okhttp3/unixdomainsockets/UnixDomainSocketFactory.java
@Override public Socket createSocket() throws IOException { UnixSocketChannel channel = UnixSocketChannel.open(); return new TunnelingUnixSocket(path, channel); } @Override public Socket createSocket(String host, int port) throws IOException { Socket result = createSocket(); try { result.connect(new InetSocketAddress(host, port)); } catch (IOException e) { result.close(); throw e; }
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sun Dec 03 21:33:52 GMT 2023 - 2.1K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/connection/RealCall.kt
} } } internal fun failRejected(e: RejectedExecutionException? = null) { val ioException = InterruptedIOException("executor rejected") ioException.initCause(e) noMoreExchanges(ioException) responseCallback.onFailure(this@RealCall, ioException) } override fun run() { threadName("OkHttp ${redactedUrl()}") { var signalledCallback = false
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Apr 20 17:03:43 GMT 2024 - 17.9K bytes - Viewed (2) -
okhttp/src/test/java/okhttp3/ResponseBodyJvmTest.kt
* limitations under the License. */ package okhttp3 import assertk.assertThat import assertk.assertions.isEqualTo import assertk.assertions.isTrue import java.io.IOException import java.io.InputStreamReader import java.io.Reader import java.nio.charset.StandardCharsets import java.util.concurrent.atomic.AtomicBoolean import kotlin.test.assertFailsWith
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 13K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/Interceptor.kt
*/ package okhttp3 import java.io.IOException import java.util.concurrent.TimeUnit /** * Observes, modifies, and potentially short-circuits requests going out and the corresponding * responses coming back in. Typically interceptors add, remove, or transform headers on the request * or response. * * Implementations of this interface throw [IOException] to signal connectivity failures. This
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) -
samples/static-server/src/main/java/okhttp3/sample/SampleServer.java
} private MockResponse fileToResponse(String path, File file) throws IOException { return new MockResponse() .setStatus("HTTP/1.1 200") .setBody(fileToBytes(file)) .addHeader("content-type: " + contentType(path)); } private Buffer fileToBytes(File file) throws IOException { Buffer result = new Buffer(); result.writeAll(Okio.source(file)); return result; }
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Wed Jan 02 02:50:44 GMT 2019 - 4.7K bytes - Viewed (0) -
okhttp-idna-mapping-table/src/main/kotlin/okhttp3/internal/idn/SimpleIdnaMappingTable.kt
DELIMITER_DOT, DELIMITER_SPACE, DELIMITER_SEMICOLON -> { throw IOException("unexpected delimiter") } } // "002F" or "0000..002C" val sourceCodePoint0 = readHexadecimalUnsignedLong() val sourceCodePoint1 = when (select(optionsDot)) { DELIMITER_DOT -> { if (readByte() != '.'.code.toByte()) throw IOException("expected '..'") readHexadecimalUnsignedLong() }
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 6.8K bytes - Viewed (0) -
okhttp-sse/src/main/kotlin/okhttp3/sse/internal/ServerSentEventReader.kt
) private val CRLF = "\r\n".encodeUtf8() @Throws(IOException::class) private fun BufferedSource.readData(data: Buffer) { data.writeByte('\n'.code) readFully(data, indexOfElement(CRLF)) select(options) // Skip the newline bytes. } @Throws(IOException::class) private fun BufferedSource.readRetryMs(): Long { val retryString = readUtf8LineStrict()
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 4.3K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/cache2/Relay.kt
} @Throws(IOException::class) private fun writeMetadata(upstreamSize: Long) { val metadataBuffer = Buffer() metadataBuffer.write(metadata) val fileOperator = FileOperator(file!!.channel) fileOperator.write(FILE_HEADER_SIZE + upstreamSize, metadataBuffer, metadata.size.toLong()) } @Throws(IOException::class) fun commit(upstreamSize: Long) {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 11.8K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/ServerTruncatesRequestTest.kt
call.execute().use { response -> assertThat(response.body.string()).isEqualTo("abc") val requestBodyOut = requestBody.takeSink() assertFailsWith<IOException> { SlowRequestBody.writeTo(requestBodyOut) } assertFailsWith<IOException> { requestBodyOut.close() } } // Confirm that the connection pool was not corrupted by making another call. makeSimpleCall()
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 9.5K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/Callback.kt
*/ package okhttp3 import okio.IOException interface Callback { /** * Called when the request could not be executed due to cancellation, a connectivity problem or * timeout. Because networks can fail during an exchange, it is possible that the remote server * accepted the request before the failure. */ fun onFailure( call: Call, e: IOException, ) /**
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 1.6K bytes - Viewed (0)