PartKt

public final class PartKt


Summary

Public methods

static final FileDataPart

Returns the part as a FileDataPart if it represents a file, and null otherwise

static final Bitmap

Returns the part as a Bitmap if it represents an image, and null otherwise

static final InlineDataPart

Returns the part as a InlineDataPart if it represents inline data, and null otherwise

static final String

Returns the part as a String if it represents text, and null otherwise

Public methods

PartKt.asFileDataOrNull

public static final FileDataPart PartKt.asFileDataOrNull(@NonNull Part receiver)

Returns the part as a FileDataPart if it represents a file, and null otherwise

PartKt.asImageOrNull

public static final Bitmap PartKt.asImageOrNull(@NonNull Part receiver)

Returns the part as a Bitmap if it represents an image, and null otherwise

PartKt.asInlineDataPartOrNull

public static final InlineDataPart PartKt.asInlineDataPartOrNull(@NonNull Part receiver)

Returns the part as a InlineDataPart if it represents inline data, and null otherwise

PartKt.asTextOrNull

public static final String PartKt.asTextOrNull(@NonNull Part receiver)

Returns the part as a String if it represents text, and null otherwise