Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for FileNotFoundException (4.9 sec)

  1. samples/static-server/src/main/java/okhttp3/sample/SampleServer.java

        String path = request.getPath();
        try {
          if (!path.startsWith("/") || path.contains("..")) throw new FileNotFoundException();
    
          File file = new File(root + path);
          return file.isDirectory()
              ? directoryToResponse(path, file)
              : fileToResponse(path, file);
        } catch (FileNotFoundException e) {
          return new MockResponse()
              .setStatus("HTTP/1.1 404")
    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)
  2. okhttp/src/main/kotlin/okhttp3/internal/-UtilCommon.kt

      try {
        delete(path)
      } catch (fnfe: FileNotFoundException) {
        return
      }
    }
    
    /** Tolerant delete, try to clear as many files as possible even after a failure. */
    internal fun FileSystem.deleteContents(directory: Path) {
      var exception: IOException? = null
      val files =
        try {
          list(directory)
        } catch (fnfe: FileNotFoundException) {
          return
        }
      for (file in files) {
    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)
  3. okhttp/src/main/kotlin/okhttp3/internal/http/RetryAndFollowUpInterceptor.kt

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    package okhttp3.internal.http
    
    import java.io.FileNotFoundException
    import java.io.IOException
    import java.io.InterruptedIOException
    import java.net.HttpURLConnection.HTTP_CLIENT_TIMEOUT
    import java.net.HttpURLConnection.HTTP_MOVED_PERM
    import java.net.HttpURLConnection.HTTP_MOVED_TEMP
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 13:24:48 GMT 2024
    - 12.1K bytes
    - Viewed (4)
  4. okhttp/src/main/kotlin/okhttp3/internal/cache/DiskLruCache.kt

    import okhttp3.internal.isCivilized
    import okhttp3.internal.okHttpName
    import okhttp3.internal.platform.Platform
    import okhttp3.internal.platform.Platform.Companion.WARN
    import okio.BufferedSink
    import okio.FileNotFoundException
    import okio.FileSystem
    import okio.ForwardingFileSystem
    import okio.ForwardingSource
    import okio.Path
    import okio.Sink
    import okio.Source
    import okio.blackholeSink
    import okio.buffer
    
    /**
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 34.7K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/CallTest.kt

              called.incrementAndGet()
              throw FileNotFoundException()
            }
          }
        val request =
          Request(
            url = server.url("/"),
            body = body,
          )
        client =
          client.newBuilder()
            .dns(DoubleInetAddressDns())
            .build()
        executeSynchronously(request)
          .assertFailure(FileNotFoundException::class.java)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 142.5K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/internal/cache/DiskLruCacheTest.kt

    import assertk.assertions.isFalse
    import assertk.assertions.isNull
    import assertk.assertions.isSameAs
    import assertk.assertions.isTrue
    import assertk.fail
    import java.io.File
    import java.io.FileNotFoundException
    import java.io.IOException
    import java.util.ArrayDeque
    import kotlin.test.assertFailsWith
    import okhttp3.SimpleProvider
    import okhttp3.TestUtil
    import okhttp3.internal.cache.DiskLruCache.Editor
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 14:55:09 GMT 2024
    - 75.8K bytes
    - Viewed (0)
  7. docs/changelogs/changelog_3x.md

     *  Fix: Don't miss whole operation timeouts when calls redirect.
     *  Fix: Don't leak connections if web sockets have malformed responses or if `onOpen()` throws.
     *  Fix: Don't retry when request bodies fail due to `FileNotFoundException`.
     *  Fix: Don't crash when URLs have IPv4-mapped IPv6 addresses.
     *  Fix: Don't crash when building `HandshakeCertificates` on Android API 28.
     *  Fix: Permit multipart file names to contain non-ASCII characters.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 06 14:55:54 GMT 2022
    - 50.8K bytes
    - Viewed (0)
Back to top