Class Embedding

java.lang.Object
net.masterthought.cucumber.json.Embedding

public class Embedding extends Object
Author:
Damian Szczepanik (damianszczepanik@github)
  • Constructor Details

  • Method Details

    • getMimeType

      public String getMimeType()
    • getData

      public String getData()
    • getName

      public String getName()
    • getDecodedData

      public String getDecodedData()
    • getFileName

      public String getFileName()
    • getFileId

      public String getFileId()
      Returns unique file ID.
      Returns:
      ID of the file
    • getExtension

      public String getExtension()
      Returns the file extension of this embedding (attachment). In case the {embedding's MIME-type is well-known, the according file extension is returned immediately. In case the MIME-type is unknown, as a first try the embedding's name will be used in order to derive a file extension. If the name contains a file name delimiter (i.e., "."), the following characters are used as the file extension as long as they match "[a-z0-9]+". As a second try, the MIME-type's subtype will be used in order to derive a file extension (as long as such subtype is given). Similar, the subtype is used as the file extension as long as it matches "[a-z0-9]+". Finally (if neither a file extension is known nor can be derived), the value "unknown" will be returned.
      Returns:
      the file extension of this embedding (attachment)