Package net.masterthought.cucumber.json
Class Embedding
- java.lang.Object
-
- net.masterthought.cucumber.json.Embedding
-
public class Embedding extends Object
- Author:
- Damian Szczepanik (damianszczepanik@github)
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getData()
String
getDecodedData()
String
getExtension()
Returns the file extension of this embedding (attachment).String
getFileId()
Returns unique file ID.String
getFileName()
String
getMimeType()
String
getName()
-
-
-
Method Detail
-
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 theembedding'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)
-
-