Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for Formatter (0.23 sec)

  1. okcurl/src/main/kotlin/okhttp3/curl/logging/LoggingUtil.kt

                handler.level = Level.FINE
                handler.formatter = MessageFormatter
                activeLogger.addHandler(handler)
              }
    
              if (sslDebug) {
                val activeLogger = getLogger("javax.net.ssl")
    
                activeLogger.level = Level.FINEST
                handler.level = Level.FINEST
                handler.formatter = MessageFormatter
                activeLogger.addHandler(handler)
              }
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Fri Apr 05 03:30:42 GMT 2024
    - 2.7K bytes
    - Viewed (1)
  2. okhttp-testing-support/src/main/kotlin/okhttp3/OkHttpDebugLogging.kt

      fun enableHttp2() = enable(Http2::class)
    
      fun enableTaskRunner() = enable(TaskRunner::class)
    
      fun logHandler() =
        ConsoleHandler().apply {
          level = Level.FINE
          formatter =
            object : SimpleFormatter() {
              override fun format(record: LogRecord) = String.format("[%1\$tF %1\$tT] %2\$s %n", record.millis, record.message)
            }
        }
    
      fun enable(
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.9K bytes
    - Viewed (0)
  3. okcurl/src/main/kotlin/okhttp3/curl/logging/OneLineLogFormat.kt

    import java.time.temporal.ChronoField.SECOND_OF_MINUTE
    import java.util.logging.Formatter
    import java.util.logging.LogRecord
    
    /**
     * Is Java8 Data and Time really this bad, or is writing this on a plane from just javadocs a bad
     * idea?
     *
     * Why so much construction?
     */
    class OneLineLogFormat : Formatter() {
      private val d =
        DateTimeFormatterBuilder()
          .appendValue(HOUR_OF_DAY, 2)
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Fri Apr 05 03:30:42 GMT 2024
    - 2.1K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/-MediaTypeCommon.kt

      var s = typeSubtype.range.last + 1
      while (s < length) {
        val parameter = PARAMETER.matchAtPolyfill(this, s)
        require(parameter != null) {
          "Parameter is not formatted correctly: \"${substring(s)}\" for: \"$this\""
        }
    
        val name = parameter.groups[1]?.value
        if (name == null) {
          s = parameter.range.last + 1
          continue
        }
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.1K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/MediaTypeTest.kt

        )
        assertInvalid(
          "text/plain; a=\"@",
          "Parameter is not formatted correctly: \"a=\"@\" for: \"text/plain; a=\"@\"",
        )
        assertInvalid(
          "text/plain; a=1; b",
          "Parameter is not formatted correctly: \"b\" for: \"text/plain; a=1; b\"",
        )
        assertInvalid(
          "text/plain; a=1; b=",
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 7.5K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/Headers.kt

        /**
         * Add a header with the specified name and formatted date. Does validation of header names and
         * value.
         */
        fun add(
          name: String,
          value: Date,
        ) = add(name, value.toHttpDateString())
    
        /**
         * Add a header with the specified name and formatted instant. Does validation of header names
         * and value.
         */
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.5K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/-UtilJvm.kt

          "[$host]"
        } else {
          host
        }
      return if (includeDefaultPort || port != defaultPort(scheme)) {
        "$host:$port"
      } else {
        host
      }
    }
    
    /** Returns a [Locale.US] formatted [String]. */
    internal fun format(
      format: String,
      vararg args: Any,
    ): String {
      return String.format(Locale.US, format, *args)
    }
    
    @Throws(IOException::class)
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Tue Jan 09 12:33:05 GMT 2024
    - 10.5K bytes
    - Viewed (0)
Back to top