Constructor and Description |
---|
MimeType(String value)
Initializes a new instance of MIME type based on serialized string value.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(MimeType other)
Indicates whether the current object is equal to another object of the same type.
|
boolean |
equals(Object obj)
Determines whether the specified
T:System.Object is equal to the current T:System.Object . |
static MimeType |
fromFileExtension(String fileName)
Creates a new MIME type based on file extension.
|
String |
getSubType()
Gets the sub media type.
|
String |
getType()
Gets the media type.
|
int |
hashCode()
Returns a hash code for this instance.
|
static boolean |
op_Equality(MimeType a,
MimeType b)
Compares two Mime type and returns a boolean indicating if the two do match.
|
static boolean |
op_Inequality(MimeType a,
MimeType b)
Compares two Mime type and returns a boolean indicating if the two do match.
|
static MimeType |
to_MimeType(String string)
Performs an implicit conversion from
System.String to MimeType . |
static String |
to_String(MimeType type)
Performs an implicit conversion from
MimeType to System.String . |
String |
toString()
Returns a
System.String that represents Mime type. |
public MimeType(String value)
Initializes a new instance of MIME type based on serialized string value.
value
- The value.public static boolean op_Equality(MimeType a, MimeType b)
Compares two Mime type and returns a boolean indicating if the two do match.
a
- The first Mime to compare.b
- The second Mime to compare.
Value: TrueValue: falsepublic static boolean op_Inequality(MimeType a, MimeType b)
Compares two Mime type and returns a boolean indicating if the two do match.
a
- The first Mime to compare.b
- The second Mime to compare.
Value: TrueValue: falsepublic static MimeType to_MimeType(String string)
Performs an implicit conversion from System.String
to MimeType
.
string
- The string.public static String to_String(MimeType type)
Performs an implicit conversion from MimeType
to System.String
.
type
- The mime type.public static MimeType fromFileExtension(String fileName)
Creates a new MIME type based on file extension.
fileName
- The name of the file.public String getType()
Gets the media type.
Value: The media type.public String getSubType()
Gets the sub media type.
Value: The sub media type.public boolean equals(MimeType other)
Indicates whether the current object is equal to another object of the same type.
other
- An object to compare with this object.other
parameter; otherwise, false.public boolean equals(Object obj)
Determines whether the specified T:System.Object
is equal to the current T:System.Object
.
public int hashCode()
Returns a hash code for this instance.