{@inheritdoc}
The best format is also determined in function of the bundle configuration.

@throws StopFormatListenerException
180795
public function getBest($header, array $priorities = [])
    {
        $request = $this->getRequest();
        $header = $header ?: $request->headers->get('Accept');

        foreach ($this->map as $elements) {
            // Check if the current RequestMatcherInterface matches the current request
            if (!$elements[0]->matches($request)) {
                continue;
            }
            $options = &$elements[1]; // Do not reallow memory for this variable

            if (!empty($options['stop'])) {
                throw new StopFormatListenerException('Stopped format listener');
            }
            if (empty($options['priorities']) && empty($priorities)) {
                if (!empty($options['fallback_format'])) {
                    return new Accept($request->getMimeType($options['fallback_format']));
                }

                continue;
            }

            if (isset($options['prefer_extension']) && $options['prefer_extension'] && !isset($extensionHeader)) {
                $extension = pathinfo($request->getPathInfo(), PATHINFO_EXTENSION);

                if (!empty($extension)) {
                    // $extensionHeader will now be either a non empty string or an empty string
                    $extensionHeader = $request->getMimeType($extension);

                    if ($extensionHeader) {
                        $header = $extensionHeader.'; q='.$options['prefer_extension'].($header ? ','.$header : '');
                    }
                }
            }

            if ($header) {
                $mimeTypes = $this->normalizePriorities($request,
                    empty($priorities) ? $options['priorities'] : $priorities
                );

                $mimeType = parent::getBest($header, $mimeTypes);

                if (null !== $mimeType) {
                    return $mimeType;
                }
            }

            if (isset($options['fallback_format'])) {
                // if false === fallback_format then we fail here instead of considering more rules
                if (false === $options['fallback_format']) {
                    return;
                }

                // stop looking at rules since we have a fallback defined
                return new Accept($request->getMimeType($options['fallback_format']));
            }
        }
    }
1202559
function() {
            this.supported = {};
            // Without support, no formats are supported
            if (!Crafty.support.audio) return;
            var audio = this.audioElement(),
                canplay;
            for (var i in this.codecs) {
                canplay = audio.canPlayType(this.codecs[i]);
                if (canplay !== "" && canplay !== "no") {
                    this.supported[i] = true;
                } else {
                    this.supported[i] = false;
                }
            }
        }
152201
@Override
  public void exitStandardMessageOptionMessageSetWireFormat(
      final StandardMessageOptionMessageSetWireFormatContext ctx) {
    verifyOptionNameUnique("messageSetWireFormat", ctx.getStart());
    scopes.getMessageOptions().setMessageSetWireFormat(
        Boolean.valueOf(ctx.BooleanLiteral().getText()));
  }
762936
public void setMessageFormat(String messageFormat) {
        if (!"string".equals(messageFormat)
                && !"message".equals(messageFormat)) {
            throw new IllegalArgumentException("Unsupported message.format=" + messageFormat + ", only supported \"string\" or \"message\" format.");
        }
        this.messageFormat = messageFormat;
    }
1112345
@Override
  public MediaFormat detectMediaFormat(@Nullable String extension, long fileSize, long width, long height) {
    SortedSet<MediaFormat> matchingFormats = detectMediaFormats(extension, fileSize, width, height);
    return !matchingFormats.isEmpty() ? matchingFormats.first() : null;
  }
773321
public void stopPlatformManager(VertxPlatformConfiguration config) {

    Vertx vertx = this.vertxPlatforms.get(config.getVertxPlatformIdentifier());
    if (vertx != null && isVertxHolded(vertx)) {
      log.log(Level.INFO,
          "Stopping Vert.x: " + config.getVertxPlatformIdentifier());
      vertxPlatforms.remove(config.getVertxPlatformIdentifier());
      stopVertx(vertx);
    }
  }
515644
private void configureInputFormat(CsvInputFormat<?> format) {
		format.setCharset(this.charset);
		format.setDelimiter(this.lineDelimiter);
		format.setFieldDelimiter(this.fieldDelimiter);
		format.setCommentPrefix(this.commentPrefix);
		format.setSkipFirstLineAsHeader(skipFirstLineAsHeader);
		format.setLenient(ignoreInvalidLines);
		if (this.parseQuotedStrings) {
			format.enableQuotedStringParsing(this.quoteCharacter);
		}
	}
991900
private CmsDynamicFunctionBean.Format getFunctionFormat() {

        CmsDynamicFunctionBean functionBean = null;
        try {
            CmsXmlContent content = CmsXmlContentFactory.unmarshal(m_cms, m_cms.readFile(m_element.getResource()));
            CmsDynamicFunctionParser parser = new CmsDynamicFunctionParser();
            functionBean = parser.parseFunctionBean(m_cms, content);
        } catch (CmsException e) {
            LOG.debug(e.getLocalizedMessage(), e);
            return null;
        }
        CmsJspStandardContextBean contextBean = CmsJspStandardContextBean.getInstance(m_request);
        String type = contextBean.getContainer().getType();
        String width = contextBean.getContainer().getWidth();
        int widthNum = -1;
        try {
            widthNum = Integer.parseInt(width);
        } catch (NumberFormatException e) {
            LOG.debug(e.getLocalizedMessage(), e);
        }
        return functionBean.getFormatForContainer(m_cms, type, widthNum);
    }
1229376
function _createFormat() {
    $objectname                   = null;
    switch( $this->format ) {
      case 'xcal':
        $objectname               = ( isset( $this->timezonetype )) ?
                                 strtolower( $this->timezonetype )  :  strtolower( $this->objName );
        $this->componentStart1    = $this->elementStart1 = '<';
        $this->componentStart2    = $this->elementStart2 = '>';
        $this->componentEnd1      = $this->elementEnd1   = '</';
        $this->componentEnd2      = $this->elementEnd2   = '>'.$this->nl;
        $this->intAttrDelimiter   = '<!-- -->';
        $this->attributeDelimiter = $this->nl;
        $this->valueInit          = null;
        break;
      default:
        $objectname               = ( isset( $this->timezonetype )) ?
                                 strtoupper( $this->timezonetype )  :  strtoupper( $this->objName );
        $this->componentStart1    = 'BEGIN:';
        $this->componentStart2    = null;
        $this->componentEnd1      = 'END:';
        $this->componentEnd2      = $this->nl;
        $this->elementStart1      = null;
        $this->elementStart2      = null;
        $this->elementEnd1        = null;
        $this->elementEnd2        = $this->nl;
        $this->intAttrDelimiter   = '<!-- -->';
        $this->attributeDelimiter = ';';
        $this->valueInit          = ':';
        break;
    }
    return $objectname;
  }
12250
public function format($newFormat = null)
    {
        if ($newFormat === null) {
            return $this->format;
        }

        $this->format = $newFormat;

        return $this;
    }
535498
@SuppressWarnings("ThrowableResultOfMethodCallIgnored")
    public void formatWrapper(final StringBuilder sb, final ThrowableProxy cause, final List<String> ignorePackages, final String suffix) {
        this.formatWrapper(sb, cause, ignorePackages, PlainTextRenderer.getInstance(), suffix);
    }
421906
public function detectFormat()
    {
        $format = $this->detectFormatByHeader();
        if ($format === null) {
            $format = $this->detectFormatByContent((string) $this->getBody());
        }

        return $format;
    }
855886
private void setMinFormatString()
    {
        int i = _tzFormatString.indexOf("ss.SSS");
        int l = 6;
        if (i>=0)
            _millis=true;
        else
        {
            i = _tzFormatString.indexOf("ss");
            l=2;
        }
        
        // Build a formatter that formats a second format string
        // Have to replace @ with ' later due to bug in SimpleDateFormat
        String ss1=_tzFormatString.substring(0,i);
        String ss2=_tzFormatString.substring(i+l);
        _minFormatString =ss1+(_millis?"'ss.SSS'":"'ss'")+ss2;
    }
857488
void setFormatString(StartElement startElement, StreamingCell cell) {
    Attribute cellStyle = startElement.getAttributeByName(new QName("s"));
    String cellStyleString = (cellStyle != null) ? cellStyle.getValue() : null;
    XSSFCellStyle style = null;

    if(cellStyleString != null) {
      style = stylesTable.getStyleAt(Integer.parseInt(cellStyleString));
    } else if(stylesTable.getNumCellStyles() > 0) {
      style = stylesTable.getStyleAt(0);
    }

    if(style != null) {
      cell.setNumericFormatIndex(style.getDataFormat());
      String formatString = style.getDataFormatString();

      if(formatString != null) {
        cell.setNumericFormat(formatString);
      } else {
        cell.setNumericFormat(BuiltinFormats.getBuiltinFormat(cell.getNumericFormatIndex()));
      }
    } else {
      cell.setNumericFormatIndex(null);
      cell.setNumericFormat(null);
    }
  }
907338
public static void useJanusMessageFormat() {
		final String format = System.getProperty(FORMAT_PROPERTY_KEY, null);
		if (format == null || format.isEmpty()) {
			System.setProperty(FORMAT_PROPERTY_KEY, JANUS_FORMAT);
		}
	}
701055
protected Format getMainFormat(CmsObject cms, I_CmsXmlContentLocation location, CmsResource functionRes) {

        I_CmsXmlContentValueLocation jspLoc = location.getSubValue("FunctionProvider");
        CmsUUID structureId = jspLoc.asId(cms);
        I_CmsXmlContentValueLocation containerSettings = location.getSubValue("ContainerSettings");
        Map<String, String> parameters = parseParameters(cms, location, "Parameter");
        if (containerSettings != null) {
            String type = getStringValue(cms, containerSettings.getSubValue("Type"), "");
            String minWidth = getStringValue(cms, containerSettings.getSubValue("MinWidth"), "");
            String maxWidth = getStringValue(cms, containerSettings.getSubValue("MaxWidth"), "");
            Format result = new Format(structureId, type, minWidth, maxWidth, parameters);
            return result;
        } else {
            Format result = new Format(structureId, "", "", "", parameters);
            result.setNoContainerSettings(true);
            return result;
        }
    }
938611
public void setFormEnabled(boolean enabled) {

        m_formEnabled = enabled;
        m_selectBox.setEnabled(enabled);
        m_heightBox.setEnabled(enabled);
        m_widthBox.setEnabled(enabled);
        if (enabled) {
            m_cropButton.enable();
            m_removeCropButton.enable();
        } else {
            m_cropButton.disable(Messages.get().key(Messages.GUI_IMAGE_NO_FORMATS_AVAILABLE_0));
            m_removeCropButton.disable(Messages.get().key(Messages.GUI_IMAGE_NO_FORMATS_AVAILABLE_0));
        }
    }