src/org/jnetpcap/protocol/voip/Sip.java
public static ContentType parseContentType(final String type) {
			if (type == null) {
				return OTHER;
			}

			for (final ContentType t : values()) {
				if (t.name().equalsIgnoreCase(type)) {
					return t;
				}

				for (final String m : t.magic) {
					if (type.startsWith(m)) {
						return t;
					}
				}
			}

			return OTHER;
		}
/**
		 * Parses a string containing content type ot a enum constant.
		 * 
		 * @param type
		 *          string containing content type
		 * @return constant if found, otherwise returns ContentType.OTHER
		 */
Parses a string containing content type ot a enum constant.

@param type
string containing content type
@return constant if found, otherwise returns ContentType.OTHER
Parses a string containing content type ot a enum constant . @param type string containing content type @return constant if found otherwise returns ContentType . OTHER
public static ContentType parseContentType(final String type) {
			if (type == null) {
				return OTHER;
			}
			for (final ContentType t : values()) {
				if (t.name().equalsIgnoreCase(type)) {
					return t;
				}
				for (final String m : t.magic) {
					if (type.startsWith(m)) {
						return t;
					}
				}
			}
			return OTHER;
		}
public static ContentType parseContentType ( final String type ) { if ( type == null ) { return OTHER ; } for ( final ContentType t : values ( ) ) { if ( t . name ( ) . equalsIgnoreCase ( type ) ) { return t ; } for ( final String m : t . magic ) { if ( type . startsWith ( m ) ) { return t ; } } } return OTHER ; }
Parses a string containing content type ot a enum constant.
Parses a string containing content type ot a enum constant .