content: package okhttp3;
  
  import java.io.File;
  import java.io.IOException;
  import java.nio.charset.Charset;
  import kotlin.Deprecated;
  import kotlin.DeprecationLevel;
  import kotlin.Metadata;
  import kotlin.ReplaceWith;
  import kotlin.jvm.JvmStatic;
  import kotlin.jvm.internal.DefaultConstructorMarker;
  import kotlin.jvm.internal.Intrinsics;
  import kotlin.text.Charsets;
  import okhttp3.internal.Util;
  import okio.BufferedSink;
  import okio.ByteString;
  
  @Metadata(bv = {1, 0, 3}, d1 = {"\u0000.\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\t\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\b&\u0018\u0000 \u000e2\u00020\u0001:\u0001\u000eB\u0005¢\u0006\u0002\u0010\u0002J\b\u0010\u0003\u001a\u00020\u0004H\u0016J\n\u0010\u0005\u001a\u0004\u0018\u00010\u0006H&J\b\u0010\u0007\u001a\u00020\bH\u0016J\b\u0010\t\u001a\u00020\bH\u0016J\u0010\u0010\n\u001a\u00020\u000b2\u0006\u0010\f\u001a\u00020\rH&¨\u0006\u000f"}, d2 = {"Lokhttp3/RequestBody;", "", "()V", "contentLength", "", "contentType", "Lokhttp3/MediaType;", "isDuplex", "", "isOneShot", "writeTo", "", "sink", "Lokio/BufferedSink;", "Companion", "okhttp"}, k = 1, mv = {1, 4, 0})
  /* compiled from: RequestBody.kt */
  public abstract class RequestBody {
      public static final Companion Companion = new Companion((DefaultConstructorMarker) null);
  
      @Metadata(bv = {1, 0, 3}, d1 = {"\u00006\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0012\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u000e\n\u0002\u0018\u0002\n\u0002\b\u0003\b\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J\u001a\u0010\u0003\u001a\u00020\u00042\b\u0010\u0005\u001a\u0004\u0018\u00010\u00062\u0006\u0010\u0007\u001a\u00020\bH\u0007J.\u0010\u0003\u001a\u00020\u00042\b\u0010\u0005\u001a\u0004\u0018\u00010\u00062\u0006\u0010\t\u001a\u00020\n2\b\b\u0002\u0010\u000b\u001a\u00020\f2\b\b\u0002\u0010\r\u001a\u00020\fH\u0007J\u001a\u0010\u0003\u001a\u00020\u00042\b\u0010\u0005\u001a\u0004\u0018\u00010\u00062\u0006\u0010\t\u001a\u00020\u000eH\u0007J\u001a\u0010\u0003\u001a\u00020\u00042\b\u0010\u0005\u001a\u0004\u0018\u00010\u00062\u0006\u0010\t\u001a\u00020\u000fH\u0007J\u001d\u0010\u0010\u001a\u00020\u0004*\u00020\b2\n\b\u0002\u0010\u0005\u001a\u0004\u0018\u00010\u0006H\u0007¢\u0006\u0002\b\u0003J1\u0010\u0011\u001a\u00020\u0004*\u00020\n2\n\b\u0002\u0010\u0005\u001a\u0004\u0018\u00010\u00062\b\b\u0002\u0010\u000b\u001a\u00020\f2\b\b\u0002\u0010\r\u001a\u00020\fH\u0007¢\u0006\u0002\b\u0003J\u001d\u0010\u0011\u001a\u00020\u0004*\u00020\u000e2\n\b\u0002\u0010\u0005\u001a\u0004\u0018\u00010\u0006H\u0007¢\u0006\u0002\b\u0003J\u001d\u0010\u0011\u001a\u00020\u0004*\u00020\u000f2\n\b\u0002\u0010\u0005\u001a\u0004\u0018\u00010\u0006H\u0007¢\u0006\u0002\b\u0003¨\u0006\u0012"}, d2 = {"Lokhttp3/RequestBody$Companion;", "", "()V", "create", "Lokhttp3/RequestBody;", "contentType", "Lokhttp3/MediaType;", "file", "Ljava/io/File;", "content", "", "offset", "", "byteCount", "", "Lokio/ByteString;", "asRequestBody", "toRequestBody", "okhttp"}, k = 1, mv = {1, 4, 0})
      /* compiled from: RequestBody.kt */
      public static final class Companion {
          private Companion() {
          }
  
          public /* synthetic */ Companion(DefaultConstructorMarker $constructor_marker) {
              this();
          }
  
          public static /* synthetic */ RequestBody create$default(Companion companion, File file, MediaType mediaType, int i, Object obj) {
              if ((i & 1) != 0) {
                  mediaType = null;
                  MediaType mediaType2 = null;
              }
              return companion.create(file, mediaType);
          }
  
          public static /* synthetic */ RequestBody create$default(Companion companion, String str, MediaType mediaType, int i, Object obj) {
              if ((i & 1) != 0) {
                  mediaType = null;
                  MediaType mediaType2 = null;
              }
              return companion.create(str, mediaType);
          }
  
          public static /* synthetic */ RequestBody create$default(Companion companion, MediaType mediaType, byte[] bArr, int i, int i2, int i3, Object obj) {
              if ((i3 & 4) != 0) {
                  i = 0;
              }
              if ((i3 & 8) != 0) {
                  i2 = bArr.length;
              }
              return companion.create(mediaType, bArr, i, i2);
          }
  
          public static /* synthetic */ RequestBody create$default(Companion companion, ByteString byteString, MediaType mediaType, int i, Object obj) {
              if ((i & 1) != 0) {
                  mediaType = null;
                  MediaType mediaType2 = null;
              }
              return companion.create(byteString, mediaType);
          }
  
          public static /* synthetic */ RequestBody create$default(Companion companion, byte[] bArr, MediaType mediaType, int i, int i2, int i3, Object obj) {
              if ((i3 & 1) != 0) {
                  mediaType = null;
                  MediaType mediaType2 = null;
              }
              if ((i3 & 2) != 0) {
                  i = 0;
              }
              if ((i3 & 4) != 0) {
                  i2 = bArr.length;
              }
              return companion.create(bArr, mediaType, i, i2);
          }
  
          @JvmStatic
          public final RequestBody create(File $this$asRequestBody, MediaType contentType) {
              Intrinsics.checkNotNullParameter($this$asRequestBody, "$this$asRequestBody");
              return new RequestBody$Companion$asRequestBody$1($this$asRequestBody, contentType);
          }
  
          @JvmStatic
          public final RequestBody create(String $this$toRequestBody, MediaType contentType) {
              Intrinsics.checkNotNullParameter($this$toRequestBody, "$this$toRequestBody");
              Charset charset = Charsets.UTF_8;
              MediaType mediaType = contentType;
              if (contentType != null) {
                  Charset charset$default = MediaType.charset$default(contentType, (Charset) null, 1, (Object) null);
                  if (charset$default == null) {
                      charset = Charsets.UTF_8;
                      mediaType = MediaType.Companion.parse(contentType + "; charset=utf-8");
                  } else {
                      charset = charset$default;
                  }
              }
              byte[] bytes = $this$toRequestBody.getBytes(charset);
              Intrinsics.checkNotNullExpressionValue(bytes, "(this as java.lang.String).getBytes(charset)");
              return create(bytes, mediaType, 0, bytes.length);
          }
  
          @JvmStatic
          @Deprecated(level = DeprecationLevel.WARNING, message = "Moved to extension function. Put the 'file' argument first to fix Java", replaceWith = @ReplaceWith(expression = "file.asRequestBody(contentType)", imports = {"okhttp3.RequestBody.Companion.asRequestBody"}))
          public final RequestBody create(MediaType contentType, File file) {
              Intrinsics.checkNotNullParameter(file, "file");
              return create(file, contentType);
          }
  
          @JvmStatic
          @Deprecated(level = DeprecationLevel.WARNING, message = "Moved to extension function. Put the 'content' argument first to fix Java", replaceWith = @ReplaceWith(expression = "content.toRequestBody(contentType)", imports = {"okhttp3.RequestBody.Companion.toRequestBody"}))
          public final RequestBody create(MediaType contentType, String content) {
              Intrinsics.checkNotNullParameter(content, "content");
              return create(content, contentType);
          }
  
          @JvmStatic
          @Deprecated(level = DeprecationLevel.WARNING, message = "Moved to extension function. Put the 'content' argument first to fix Java", replaceWith = @ReplaceWith(expression = "content.toRequestBody(contentType)", imports = {"okhttp3.RequestBody.Companion.toRequestBody"}))
          public final RequestBody create(MediaType contentType, ByteString content) {
              Intrinsics.checkNotNullParameter(content, "content");
              return create(content, contentType);
          }
  
          @JvmStatic
          @Deprecated(level = DeprecationLevel.WARNING, message = "Moved to extension function. Put the 'content' argument first to fix Java", replaceWith = @ReplaceWith(expression = "content.toRequestBody(contentType, offset, byteCount)", imports = {"okhttp3.RequestBody.Companion.toRequestBody"}))
          public final RequestBody create(MediaType mediaType, byte[] bArr) {
              return create$default(this, mediaType, bArr, 0, 0, 12, (Object) null);
          }
  
          @JvmStatic
          @Deprecated(level = DeprecationLevel.WARNING, message = "Moved to extension function. Put the 'content' argument first to fix Java", replaceWith = @ReplaceWith(expression = "content.toRequestBody(contentType, offset, byteCount)", imports = {"okhttp3.RequestBody.Companion.toRequestBody"}))
          public final RequestBody create(MediaType mediaType, byte[] bArr, int i) {
              return create$default(this, mediaType, bArr, i, 0, 8, (Object) null);
          }
  
          @JvmStatic
          @Deprecated(level = DeprecationLevel.WARNING, message = "Moved to extension function. Put the 'content' argument first to fix Java", replaceWith = @ReplaceWith(expression = "content.toRequestBody(contentType, offset, byteCount)", imports = {"okhttp3.RequestBody.Companion.toRequestBody"}))
          public final RequestBody create(MediaType contentType, byte[] content, int offset, int byteCount) {
              Intrinsics.checkNotNullParameter(content, "content");
              return create(content, contentType, offset, byteCount);
          }
  
          @JvmStatic
          public final RequestBody create(ByteString $this$toRequestBody, MediaType contentType) {
              Intrinsics.checkNotNullParameter($this$toRequestBody, "$this$toRequestBody");
              return new RequestBody$Companion$toRequestBody$1($this$toRequestBody, contentType);
          }
  
          @JvmStatic
          public final RequestBody create(byte[] bArr) {
              return create$default(this, bArr, (MediaType) null, 0, 0, 7, (Object) null);
          }
  
          @JvmStatic
          public final RequestBody create(byte[] bArr, MediaType mediaType) {
              return create$default(this, bArr, mediaType, 0, 0, 6, (Object) null);
          }
  
          @JvmStatic
          public final RequestBody create(byte[] bArr, MediaType mediaType, int i) {
              return create$default(this, bArr, mediaType, i, 0, 4, (Object) null);
          }
  
          @JvmStatic
          public final RequestBody create(byte[] $this$toRequestBody, MediaType contentType, int offset, int byteCount) {
              Intrinsics.checkNotNullParameter($this$toRequestBody, "$this$toRequestBody");
              Util.checkOffsetAndCount((long) $this$toRequestBody.length, (long) offset, (long) byteCount);
              return new RequestBody$Companion$toRequestBody$2($this$toRequestBody, contentType, byteCount, offset);
          }
      }
  
      @JvmStatic
      public static final RequestBody create(File file, MediaType mediaType) {
          return Companion.create(file, mediaType);
      }
  
      @JvmStatic
      public static final RequestBody create(String str, MediaType mediaType) {
          return Companion.create(str, mediaType);
      }
  
      @JvmStatic
      @Deprecated(level = DeprecationLevel.WARNING, message = "Moved to extension function. Put the 'file' argument first to fix Java", replaceWith = @ReplaceWith(expression = "file.asRequestBody(contentType)", imports = {"okhttp3.RequestBody.Companion.asRequestBody"}))
      public static final RequestBody create(MediaType mediaType, File file) {
          return Companion.create(mediaType, file);
      }
  
      @JvmStatic
      @Deprecated(level = DeprecationLevel.WARNING, message = "Moved to extension function. Put the 'content' argument first to fix Java", replaceWith = @ReplaceWith(expression = "content.toRequestBody(contentType)", imports = {"okhttp3.RequestBody.Companion.toRequestBody"}))
      public static final RequestBody create(MediaType mediaType, String str) {
          return Companion.create(mediaType, str);
      }
  
      @JvmStatic
      @Deprecated(level = DeprecationLevel.WARNING, message = "Moved to extension function. Put the 'content' argument first to fix Java", replaceWith = @ReplaceWith(expression = "content.toRequestBody(contentType)", imports = {"okhttp3.RequestBody.Companion.toRequestBody"}))
      public static final RequestBody create(MediaType mediaType, ByteString byteString) {
          return Companion.create(mediaType, byteString);
      }
  
      @JvmStatic
      @Deprecated(level = DeprecationLevel.WARNING, message = "Moved to extension function. Put the 'content' argument first to fix Java", replaceWith = @ReplaceWith(expression = "content.toRequestBody(contentType, offset, byteCount)", imports = {"okhttp3.RequestBody.Companion.toRequestBody"}))
      public static final RequestBody create(MediaType mediaType, byte[] bArr) {
          return Companion.create$default(Companion, mediaType, bArr, 0, 0, 12, (Object) null);
      }
  
      @JvmStatic
      @Deprecated(level = DeprecationLevel.WARNING, message = "Moved to extension function. Put the 'content' argument first to fix Java", replaceWith = @ReplaceWith(expression = "content.toRequestBody(contentType, offset, byteCount)", imports = {"okhttp3.RequestBody.Companion.toRequestBody"}))
      public static final RequestBody create(MediaType mediaType, byte[] bArr, int i) {
          return Companion.create$default(Companion, mediaType, bArr, i, 0, 8, (Object) null);
      }
  
      @JvmStatic
      @Deprecated(level = DeprecationLevel.WARNING, message = "Moved to extension function. Put the 'content' argument first to fix Java", replaceWith = @ReplaceWith(expression = "content.toRequestBody(contentType, offset, byteCount)", imports = {"okhttp3.RequestBody.Companion.toRequestBody"}))
      public static final RequestBody create(MediaType mediaType, byte[] bArr, int i, int i2) {
          return Companion.create(mediaType, bArr, i, i2);
      }
  
      @JvmStatic
      public static final RequestBody create(ByteString byteString, MediaType mediaType) {
          return Companion.create(byteString, mediaType);
      }
  
      @JvmStatic
      public static final RequestBody create(byte[] bArr) {
          return Companion.create$default(Companion, bArr, (MediaType) null, 0, 0, 7, (Object) null);
      }
  
      @JvmStatic
      public static final RequestBody create(byte[] bArr, MediaType mediaType) {
          return Companion.create$default(Companion, bArr, mediaType, 0, 0, 6, (Object) null);
      }
  
      @JvmStatic
      public static final RequestBody create(byte[] bArr, MediaType mediaType, int i) {
          return Companion.create$default(Companion, bArr, mediaType, i, 0, 4, (Object) null);
      }
  
      @JvmStatic
      public static final RequestBody create(byte[] bArr, MediaType mediaType, int i, int i2) {
          return Companion.create(bArr, mediaType, i, i2);
      }
  
      public long contentLength() throws IOException {
          return -1;
      }
  
      public abstract MediaType contentType();
  
      public boolean isDuplex() {
          return false;
      }
  
      public boolean isOneShot() {
          return false;
      }
  
      public abstract void writeTo(BufferedSink bufferedSink) throws IOException;
  }
  