Return the appropriate JMSBodyType for a specific format string

@param format  A String corresponding to the SDO format of a JMS Message

@return JmsBodyType The JmsBodyType singleton which maps to the given format string
506403
public static JmsBodyType getBodyType(String format) {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "getBodyType");

    JmsBodyType result = null;
    if (format.equals(SIApiConstants.JMS_FORMAT_BYTES))
      result = BYTES;
    else if (format.equals(SIApiConstants.JMS_FORMAT_TEXT))
      result = TEXT;
    else if (format.equals(SIApiConstants.JMS_FORMAT_OBJECT))
      result = OBJECT;
    else if (format.equals(SIApiConstants.JMS_FORMAT_STREAM))
      result = STREAM;
    else if (format.equals(SIApiConstants.JMS_FORMAT_MAP))
      result = MAP;
    else if (format.equals(SIApiConstants.JMS_FORMAT))
      result = NULL;

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "getBodyType");
    return result;
  }
894351
public PactDslJsonArray time(String format) {
      FastDateFormat instance = FastDateFormat.getInstance(format);
      body.put(instance.format(new Date(DATE_2000)));
      generators.addGenerator(Category.BODY, rootPath + appendArrayIndex(0), new TimeGenerator(format));
      matchers.addRule(rootPath + appendArrayIndex(0), matchTime(format));
      return this;
    }
1299179
public String format(String format)
  {
    CharBuffer cb = new CharBuffer();

    return format(cb, format).close();
  }
1271951
@Override
	public Serializable getObject() throws JMSException
    {
        if (body == null)
            return null;
        
        try
        {
        	return SerializationTools.fromByteArray(body);
        }
        catch (Exception e)
        {
        	throw new FFMQException("Cannot deserialize object message body","MESSAGE_ERROR",e);
        }
    }
292055
protected function getFormat($format)
    {
        if ($format === false) {
            $format = 'none';
        }
        
        $types = [
            'none' => \IntlDateFormatter::NONE,
            'short' => \IntlDateFormatter::SHORT,
            'medium' => \IntlDateFormatter::MEDIUM,
            'long' => \IntlDateFormatter::LONG,
            'full' => \IntlDateFormatter::FULL
        ];
        
        return isset($types[$format]) ? $types[$format] : null;
    }
997702
private static DateFormat getDateFormat() {
        String pattern;
        int patternLength;
        int endOfSecsIndex;
        // Retrieve a standard Java DateFormat object with desired format.
        DateFormat formatter = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.MEDIUM);
        if (formatter instanceof SimpleDateFormat) {
            // Retrieve the pattern from the formatter, since we will need to
            // modify it.
            SimpleDateFormat sdFormatter = (SimpleDateFormat) formatter;
            pattern = sdFormatter.toPattern();
            // Append milliseconds and timezone after seconds
            patternLength = pattern.length();
            endOfSecsIndex = pattern.lastIndexOf('s') + 1;
            String newPattern = pattern.substring(0, endOfSecsIndex) + ":SSS z";
            if (endOfSecsIndex < patternLength)
                newPattern += pattern.substring(endOfSecsIndex, patternLength);
            // 0-23 hour clock (get rid of any other clock formats and am/pm)
            newPattern = newPattern.replace('h', 'H');
            newPattern = newPattern.replace('K', 'H');
            newPattern = newPattern.replace('k', 'H');
            newPattern = newPattern.replace('a', ' ');
            newPattern = newPattern.trim();
            sdFormatter.applyPattern(newPattern);
            formatter = sdFormatter;
        } else {
            formatter = new SimpleDateFormat("dd/MMM/yyyy HH:mm:ss:SSS z");
        }
        return formatter;
    }
199606
public String getFormattedDate(String format) {
        SimpleDateFormat dateFormat = new SimpleDateFormat(format);
        return dateFormat.format(date);
    }
1330938
public final PersistenceType getJmsDeliveryMode() {
        if (getHdr2().getChoiceField(JsHdr2Access.JMSDELIVERYMODE) == JsHdr2Access.IS_JMSDELIVERYMODE_EMPTY) {
            return getDerivedJmsDeliveryMode();
        }
        else {
            Byte pType = (Byte) getHdr2().getField(JsHdr2Access.JMSDELIVERYMODE_DATA);
            return PersistenceType.getPersistenceType(pType);
        }
    }
103125
static DateFormat getBasicDateFormatter() {
        String pattern;
        int patternLength;
        int endOfSecsIndex;
        // Retrieve a standard Java DateFormat object with desired format.
        DateFormat formatter = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.MEDIUM);
        if (formatter instanceof SimpleDateFormat) {
            // Retrieve the pattern from the formatter, since we will need to modify it.
            SimpleDateFormat sdFormatter = (SimpleDateFormat) formatter;
            pattern = sdFormatter.toPattern();
            // Append milliseconds and timezone after seconds
            patternLength = pattern.length();
            endOfSecsIndex = pattern.lastIndexOf('s') + 1;
            String newPattern = pattern.substring(0, endOfSecsIndex) + ":SSS z";
            if (endOfSecsIndex < patternLength)
                newPattern += pattern.substring(endOfSecsIndex, patternLength);
            // 0-23 hour clock (get rid of any other clock formats and am/pm)
            newPattern = newPattern.replace('h', 'H');
            newPattern = newPattern.replace('K', 'H');
            newPattern = newPattern.replace('k', 'H');
            newPattern = newPattern.replace('a', ' ');
            newPattern = newPattern.trim();
            sdFormatter.applyPattern(newPattern);
            formatter = sdFormatter;
        } else {
            formatter = new SimpleDateFormat("yy.MM.dd HH:mm:ss:SSS z");
        }
        // PK13288 Start
        if (sysTimeZone != null) {
            formatter.setTimeZone(sysTimeZone);
        }
        // PK13288 End.
        return formatter;
    }
928768
public static String format(Date date, DateFormat format) {
		if (null == format || null == date) {
			return null;
		}
		return format.format(date);
	}
1185483
public String getSystemMessageId() {
    //based on com.ibm.ws.sib.mfp.impl.JsHdrsImpl
    if (uuid != null) {
      StringBuilder buff = new StringBuilder(uuid.toString());
      buff.append(MfpConstants.MESSAGE_HANDLE_SEPARATOR);
      buff.append(value);
      return new String(buff);
    }
    else {
      return null;
    }
  }
1276993
public static PactDslRootValue time(String format) {
    FastDateFormat instance = FastDateFormat.getInstance(format);
    PactDslRootValue value = new PactDslRootValue();
    value.generators.addGenerator(Category.BODY, "", new TimeGenerator(format));
    value.setValue(instance.format(new Date(DATE_2000)));
    value.setMatcher(value.matchTime(format));
    return value;
  }
1057074
public static PactDslRootValue timestamp(String format) {
    PactDslRootValue value = new PactDslRootValue();
    value.generators.addGenerator(Category.BODY, "", new DateTimeGenerator(format));
    FastDateFormat instance = FastDateFormat.getInstance(format);
    value.setValue(instance.format(new Date(DATE_2000)));
    value.setMatcher(value.matchTimestamp(format));
    return value;
  }
829782
private MessageType getMessageType(Message response) {
        String messageTypeString = (String) response.getHeader(MessageHeaders.MESSAGE_TYPE);
        if (MessageType.knows(messageTypeString)){
            return MessageType.valueOf(messageTypeString.toUpperCase());
        }
        return null;
    }
90820
public final String getJmsType() {
        if (getHdr2().getChoiceField(JsHdr2Access.JMSTYPE) == JsHdr2Access.IS_JMSTYPE_EMPTY) {
            return getDerivedJmsType();
        }
        else {
            return (String) getHdr2().getField(JsHdr2Access.JMSTYPE_DATA);
        }
    }
630910
private static JsJmsMessage decodeMapBody(String body) throws MessageDecodeFailedException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "decodeMapBody");
        JsJmsMapMessage result = new JsJmsMapMessageImpl(MfpConstants.CONSTRUCTOR_NO_OP);
        if (body != null) {
            try {
                StringTokenizer st = new StringTokenizer(body, "&");
                while (st.hasMoreTokens()) {
                    Object[] pair = decodePair(st.nextToken());
                    result.setObject((String) pair[0], pair[1]);
                }
            } catch (UnsupportedEncodingException e) {
                FFDCFilter.processException(e, "com.ibm.ws.sib.mfp.impl.WebJsJmsMessageFactoryImpl.decodeMapBody", "218");
                // This can't happen, as the Exception can only be thrown for an MQ message
                // which isn't what we have.
            }
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "decodeMapBody");
        return result;
    }
512619
public static function getPort(ServerRequestInterface $request, string $format): string
    {
        switch ($format) {
            case 'canonical':
            case 'local':
                return (string) ($request->getUri()->getPort()
                    ?: ('https' === $request->getUri()->getScheme() ? 443 : 80));
            default:
                return '-';
        }
    }