Module tdlight.api

Class TdApi.GetFileExtension

Enclosing class:
TdApi

public static final class TdApi.GetFileExtension extends TdApi.Function<TdApi.Text>
Returns the extension of a file, guessed by its MIME type. Returns an empty string on failure. Can be called synchronously.

Returns Text

  • Field Details

    • mimeType

      public String mimeType
      The MIME type of the file.
    • CONSTRUCTOR

      public static final int CONSTRUCTOR
      See Also:
  • Constructor Details

    • GetFileExtension

      public GetFileExtension()
      Returns the extension of a file, guessed by its MIME type. Returns an empty string on failure. Can be called synchronously.

      Returns Text

    • GetFileExtension

      public GetFileExtension(String mimeType)
      Returns the extension of a file, guessed by its MIME type. Returns an empty string on failure. Can be called synchronously.

      Returns Text

      Parameters:
      mimeType - String The MIME type of the file.
    • GetFileExtension

      public GetFileExtension(DataInput input) throws IOException
      Returns the extension of a file, guessed by its MIME type. Returns an empty string on failure. Can be called synchronously.

      Returns Text

      Throws:
      IOException
  • Method Details