Namespace: OpenEdge.Net
Type: Class MimeTypeHelper
Parent Classes:
Progress.Lang.Object

Inherits: Progress.Lang.Object


/* *************************************************************************************************************************
Copyright (c) 2016 by Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved.
File:MimeTypeHelper
Purpose:Helper class for working with (some) MIME types, especially JSON and XML, and where there
are charset and other parameters that muddy the waters when doing comparisons
Author(s):pjudge
Created:2016-07-25



Method Summary
  Options Name Purpose
  LOGICAL IsFormEncoded (character) /* Indicates whether a given MIME type is a form encoded type @param character The mime type @return logical TRUE iff the input type is valid and form-encoded */
  LOGICAL IsJson (character) /* Indicates whether a given MIME type is JSON @param character The mime type @return logical TRUE iff the input type is valid and JSON */
  LOGICAL IsMultipart (character) /* Indicates whether a given MIME type is a multipart type @param character The mime type @return logical TRUE iff the input type is valid and multipart */
  LOGICAL IsXML (character) /* Indicates whether a given MIME type is XML @param character The mime type @return logical TRUE iff the input type is valid and XML */
  CHARACTER SplitType (character) /* Strips the vendor prefix and any parmeters from the input type, and returns the type and subtype in an array @param character a MIME type @return character[2] An array of the type [1] and subtype [2] */

Constructor Summary
  Options Name Purpose
  MimeTypeHelper ()

Method Detail
Top

LOGICAL IsFormEncoded (character)

/* Indicates whether a given MIME type is a form encoded type
Parameters:
pcMimeType CHARACTER
 
Returns LOGICAL
  logical TRUE iff the input type is valid and form-encoded
Top

LOGICAL IsJson (character)

/* Indicates whether a given MIME type is JSON
Parameters:
pcMimeType CHARACTER
 
Returns LOGICAL
  logical TRUE iff the input type is valid and JSON
Top

LOGICAL IsMultipart (character)

/* Indicates whether a given MIME type is a multipart type
Parameters:
pcMimeType CHARACTER
 
Returns LOGICAL
  logical TRUE iff the input type is valid and multipart
Top

LOGICAL IsXML (character)

/* Indicates whether a given MIME type is XML
Parameters:
pcMimeType CHARACTER
 
Returns LOGICAL
  logical TRUE iff the input type is valid and XML
Top

CHARACTER SplitType (character)

/* Strips the vendor prefix and any parmeters from the input type, and
returns the type and subtype in an array
Parameters:
pcMimeType CHARACTER
 
Returns CHARACTER
  character[2] An array of the type [1] and subtype [2]


Constructor Detail
Top

MimeTypeHelper ()