• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java IMimeType类的典型用法和代码示例

java 2次浏览

本文整理汇总了Java中com.helger.commons.mime.IMimeType的典型用法代码示例。如果您正苦于以下问题:Java IMimeType类的具体用法?Java IMimeType怎么用?Java IMimeType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

IMimeType类属于com.helger.commons.mime包,在下文中一共展示了IMimeType类的24个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: convertToNative

点赞 2

import com.helger.commons.mime.IMimeType; //导入依赖的package包/类
@Nonnull
public PModePayloadProfile convertToNative (final IMicroElement aElement)
{
  final String sName = aElement.getAttributeValue (ATTR_NAME);
  final IMimeType aMimeType = MimeTypeParser.parseMimeType (aElement.getAttributeValue (ATTR_MIME_TYPE));
  final String sXSDFilename = aElement.getAttributeValue (ATTR_XSD_FILENAME);
  final Integer aMaxSizeKB = aElement.getAttributeValueWithConversion (ATTR_MAX_SIZE_KB, Integer.class);
  final EMandatory eMandatory = EMandatory.valueOf (StringParser.parseBool (aElement.getAttributeValue (ATTR_MANDATORY),
                                                                            false));

  return new PModePayloadProfile (sName, aMimeType, sXSDFilename, aMaxSizeKB, eMandatory);
}
 

开发者ID:phax,
项目名称:ph-as4,
代码行数:13,
代码来源:PModePayloadProfileMicroTypeConverter.java

示例2: PModePayloadProfile

点赞 2

import com.helger.commons.mime.IMimeType; //导入依赖的package包/类
public PModePayloadProfile (@Nonnull @Nonempty final String sName,
                            @Nonnull final IMimeType aMimeType,
                            @Nullable final String sXSDFilename,
                            @Nullable final Integer aMaxSizeKB,
                            @Nonnull final EMandatory eMandatory)
{
  m_sName = ValueEnforcer.notEmpty (sName, "Name");
  m_aMimeType = ValueEnforcer.notNull (aMimeType, "MimeType");
  m_sXSDFilename = sXSDFilename;
  m_aMaxSizeKB = aMaxSizeKB;
  m_eMandatory = ValueEnforcer.notNull (eMandatory, "Mandatory");
}
 

开发者ID:phax,
项目名称:ph-as4,
代码行数:13,
代码来源:PModePayloadProfile.java

示例3: createOutgoingFileAttachment

点赞 2

import com.helger.commons.mime.IMimeType; //导入依赖的package包/类
/**
 * Constructor. Performs compression internally.
 *
 * @param aSrcFile
 *        Source, uncompressed, unencrypted file.
 * @param aMimeType
 *        Original mime type of the file.
 * @param eCompressionMode
 *        Optional compression mode to use. May be <code>null</code>.
 * @param aResMgr
 *        The resource manager to use. May not be <code>null</code>.
 * @return The newly created attachment instance. Never <code>null</code>.
 * @throws IOException
 *         In case something goes wrong during compression
 */
@Nonnull
public static WSS4JAttachment createOutgoingFileAttachment (@Nonnull final File aSrcFile,
                                                            @Nonnull final IMimeType aMimeType,
                                                            @Nullable final EAS4CompressionMode eCompressionMode,
                                                            @Nonnull final AS4ResourceManager aResMgr) throws IOException
{
  ValueEnforcer.notNull (aSrcFile, "File");
  ValueEnforcer.notNull (aMimeType, "MimeType");

  final WSS4JAttachment ret = new WSS4JAttachment (aResMgr, aMimeType.getAsString ());
  _addOutgoingHeaders (ret, FilenameHelper.getWithoutPath (aSrcFile));

  // If the attachment has an compressionMode do it directly, so that
  // encryption later on works on the compressed content
  File aRealFile;
  if (eCompressionMode != null)
  {
    ret.setCompressionMode (eCompressionMode);

    // Create temporary file with compressed content
    aRealFile = aResMgr.createTempFile ();
    try (final OutputStream aOS = eCompressionMode.getCompressStream (FileHelper.getBufferedOutputStream (aRealFile)))
    {
      StreamHelper.copyInputStreamToOutputStream (FileHelper.getBufferedInputStream (aSrcFile), aOS);
    }
  }
  else
  {
    // No compression - use file as-is
    aRealFile = aSrcFile;
  }
  ret.setSourceStreamProvider (HasInputStream.multiple ( () -> FileHelper.getBufferedInputStream (aRealFile)));
  return ret;
}
 

开发者ID:phax,
项目名称:ph-as4,
代码行数:50,
代码来源:WSS4JAttachment.java

示例4: getAllInfosOfMimeType

点赞 2

import com.helger.commons.mime.IMimeType; //导入依赖的package包/类
/**
 * Get all infos associated with the passed mime type.
 *
 * @param aMimeType
 *        The mime type to search. May be <code>null</code>.
 * @return <code>null</code> if a <code>null</code> mime type was passed or
 *         the passed mime type is unknown.
 */
@Nullable
@ReturnsMutableCopy
public ICommonsList <MimeTypeInfo> getAllInfosOfMimeType (@Nullable final IMimeType aMimeType)
{
  if (aMimeType == null)
    return null;

  final ICommonsList <MimeTypeInfo> ret = m_aRWLock.readLocked ( () -> m_aMapMimeType.get (aMimeType));

  // Create a copy if present
  return ret == null ? null : ret.getClone ();
}
 

开发者ID:phax,
项目名称:ph-commons,
代码行数:21,
代码来源:MimeTypeInfoManager.java

示例5: getAllMimeTypes

点赞 2

import com.helger.commons.mime.IMimeType; //导入依赖的package包/类
/**
 * @return A non-<code>null</code> set with all mime types known to this
 *         instance.
 */
@Nonnull
@ReturnsMutableCopy
public ICommonsOrderedSet <IMimeType> getAllMimeTypes ()
{
  final ICommonsOrderedSet <IMimeType> ret = new CommonsLinkedHashSet <> ();
  m_aRWLock.readLocked ( () -> m_aList.forEach (i -> ret.addAll (i.getAllMimeTypes ())));
  return ret;
}
 

开发者ID:phax,
项目名称:ph-commons,
代码行数:13,
代码来源:MimeTypeInfoManager.java

示例6: getAllMimeTypesForFilename

点赞 2

import com.helger.commons.mime.IMimeType; //导入依赖的package包/类
/**
 * Get all mime types that are associated to the extension of the specified
 * filename.
 *
 * @param sFilename
 *        The filename to search. May neither be <code>null</code> nor empty.
 * @return Never <code>null</code> but maybe empty set if no mime type is
 *         associated with the extension of the passed filename.
 */
@Nonnull
@ReturnsMutableCopy
public ICommonsSet <IMimeType> getAllMimeTypesForFilename (@Nonnull @Nonempty final String sFilename)
{
  ValueEnforcer.notEmpty (sFilename, "Filename");

  final String sExtension = FilenameHelper.getExtension (sFilename);
  return getAllMimeTypesForExtension (sExtension);
}
 

开发者ID:phax,
项目名称:ph-commons,
代码行数:19,
代码来源:MimeTypeInfoManager.java

示例7: getAllMimeTypesForExtension

点赞 2

import com.helger.commons.mime.IMimeType; //导入依赖的package包/类
/**
 * Get all mime types that are associated to the specified filename extension.
 *
 * @param sExtension
 *        The filename extension to search. May not be <code>null</code>.
 * @return Never <code>null</code> but maybe empty set if no mime type is
 *         associated with the passed extension.
 */
@Nonnull
@ReturnsMutableCopy
public ICommonsOrderedSet <IMimeType> getAllMimeTypesForExtension (@Nonnull final String sExtension)
{
  ValueEnforcer.notNull (sExtension, "Extension");

  final ICommonsOrderedSet <IMimeType> ret = new CommonsLinkedHashSet <> ();
  final ICommonsList <MimeTypeInfo> aInfos = getAllInfosOfExtension (sExtension);
  if (aInfos != null)
    for (final MimeTypeInfo aInfo : aInfos)
      ret.addAll (aInfo.getAllMimeTypes ());
  return ret;
}
 

开发者ID:phax,
项目名称:ph-commons,
代码行数:22,
代码来源:MimeTypeInfoManager.java

示例8: getPrimaryMimeTypeForExtension

点赞 2

import com.helger.commons.mime.IMimeType; //导入依赖的package包/类
/**
 * Get the primary (=first) mime type that is associated to the specified
 * filename extension.
 *
 * @param sExtension
 *        The filename extension to search. May not be <code>null</code>.
 * @return <code>null</code> if no mime type is associated with the passed
 *         extension.
 */
@Nullable
public IMimeType getPrimaryMimeTypeForExtension (@Nonnull final String sExtension)
{
  ValueEnforcer.notNull (sExtension, "Extension");

  final ICommonsList <MimeTypeInfo> aInfos = getAllInfosOfExtension (sExtension);
  if (aInfos != null)
    for (final MimeTypeInfo aInfo : aInfos)
      return aInfo.getPrimaryMimeType ();
  return null;
}
 

开发者ID:phax,
项目名称:ph-commons,
代码行数:21,
代码来源:MimeTypeInfoManager.java

示例9: getAllExtensionsOfMimeType

点赞 2

import com.helger.commons.mime.IMimeType; //导入依赖的package包/类
/**
 * Get all extensions associated to the specified mime type
 *
 * @param aMimeType
 *        The mime type to search. May be <code>null</code>.
 * @return Never <code>null</code> but empty set if no extensions are present.
 */
@Nonnull
@ReturnsMutableCopy
public ICommonsOrderedSet <String> getAllExtensionsOfMimeType (@Nullable final IMimeType aMimeType)
{
  final ICommonsOrderedSet <String> ret = new CommonsLinkedHashSet <> ();
  final ICommonsList <MimeTypeInfo> aInfos = getAllInfosOfMimeType (aMimeType);
  if (aInfos != null)
    for (final MimeTypeInfo aInfo : aInfos)
      ret.addAll (aInfo.getAllExtensions ());
  return ret;
}
 

开发者ID:phax,
项目名称:ph-commons,
代码行数:19,
代码来源:MimeTypeInfoManager.java

示例10: getPrimaryExtensionOfMimeType

点赞 2

import com.helger.commons.mime.IMimeType; //导入依赖的package包/类
/**
 * Get the primary (=first) extension for the specified mime type.
 *
 * @param aMimeType
 *        The mime type to be searched. May be <code>null</code>.
 * @return <code>null</code> if the mime type has no file extension assigned
 */
@Nullable
public String getPrimaryExtensionOfMimeType (@Nullable final IMimeType aMimeType)
{
  final ICommonsList <MimeTypeInfo> aInfos = getAllInfosOfMimeType (aMimeType);
  if (aInfos != null)
    for (final MimeTypeInfo aInfo : aInfos)
    {
      // Not every info has an extension!
      final String ret = aInfo.getPrimaryExtension ();
      if (ret != null)
        return ret;
    }
  return null;
}
 

开发者ID:phax,
项目名称:ph-commons,
代码行数:22,
代码来源:MimeTypeInfoManager.java

示例11: getAllGlobsOfMimeType

点赞 2

import com.helger.commons.mime.IMimeType; //导入依赖的package包/类
/**
 * Get all globs (=filename patterns) associated to the specified mime type
 *
 * @param aMimeType
 *        The mime type to search. May be <code>null</code>.
 * @return Never <code>null</code> but empty set if no globs are present.
 */
@Nonnull
@ReturnsMutableCopy
public ICommonsOrderedSet <String> getAllGlobsOfMimeType (@Nullable final IMimeType aMimeType)
{
  final ICommonsOrderedSet <String> ret = new CommonsLinkedHashSet <> ();
  final ICommonsList <MimeTypeInfo> aInfos = getAllInfosOfMimeType (aMimeType);
  if (aInfos != null)
    for (final MimeTypeInfo aInfo : aInfos)
      ret.addAll (aInfo.getAllGlobs ());
  return ret;
}
 

开发者ID:phax,
项目名称:ph-commons,
代码行数:19,
代码来源:MimeTypeInfoManager.java

示例12: getAllMimeTypes

点赞 2

import com.helger.commons.mime.IMimeType; //导入依赖的package包/类
@Nonnull
@Nonempty
@ReturnsMutableCopy
public ICommonsSet <IMimeType> getAllMimeTypes ()
{
  return m_aMimeTypes.getAllMapped (MimeTypeWithSource::getMimeType);
}
 

开发者ID:phax,
项目名称:ph-commons,
代码行数:8,
代码来源:MimeTypeInfo.java

示例13: containsMimeType

点赞 2

import com.helger.commons.mime.IMimeType; //导入依赖的package包/类
public boolean containsMimeType (@Nullable final IMimeType aMimeType)
{
  if (aMimeType != null)
    for (final MimeTypeWithSource aItem : m_aMimeTypes)
      if (aItem.getMimeType ().equals (aMimeType))
        return true;
  return false;
}
 

开发者ID:phax,
项目名称:ph-commons,
代码行数:9,
代码来源:MimeTypeInfo.java

示例14: testGetAllMimeTypes

点赞 2

import com.helger.commons.mime.IMimeType; //导入依赖的package包/类
@Test
public void testGetAllMimeTypes ()
{
  final MimeTypeInfoManager aMgr = MimeTypeInfoManager.getDefaultInstance ();
  for (final IMimeType aMimeType : aMgr.getAllMimeTypes ())
    assertNotNull (aMimeType);
  for (final String sMimeType : aMgr.getAllMimeTypeStrings ())
    assertTrue (StringHelper.hasText (sMimeType));
}
 

开发者ID:phax,
项目名称:ph-commons,
代码行数:10,
代码来源:MimeTypeInfoManagerTest.java

示例15: readObject

点赞 2

import com.helger.commons.mime.IMimeType; //导入依赖的package包/类
private void readObject (@Nonnull final ObjectInputStream in) throws IOException, ClassNotFoundException
{
  m_aMimeType = (IMimeType) in.readObject ();
  m_bBase64Encoded = in.readBoolean ();
  m_aContent = (byte []) in.readObject ();
  final String sCharsetName = in.readUTF ();
  m_aCharset = CharsetHelper.getCharsetFromName (sCharsetName);
  m_sContent = (String) in.readObject ();
}
 

开发者ID:phax,
项目名称:ph-css,
代码行数:10,
代码来源:CSSDataURL.java

示例16: getMimeType

点赞 2

import com.helger.commons.mime.IMimeType; //导入依赖的package包/类
@Nonnull
public IMimeType getMimeType ()
{
  return m_aMimeType;
}
 

开发者ID:phax,
项目名称:ph-as4,
代码行数:6,
代码来源:PModePayloadProfile.java

示例17: MimeTypeWithSource

点赞 2

import com.helger.commons.mime.IMimeType; //导入依赖的package包/类
public MimeTypeWithSource (@Nonnull final IMimeType aMimeType)
{
  this (aMimeType, (String) null);
}
 

开发者ID:phax,
项目名称:ph-commons,
代码行数:5,
代码来源:MimeTypeInfo.java

示例18: getPrimaryMimeType

点赞 2

import com.helger.commons.mime.IMimeType; //导入依赖的package包/类
@Nonnull
public IMimeType getPrimaryMimeType ()
{
  return getPrimaryMimeTypeWithSource ().getMimeType ();
}
 

开发者ID:phax,
项目名称:ph-commons,
代码行数:6,
代码来源:MimeTypeInfo.java

示例19: testKnownSpecial

点赞 2

import com.helger.commons.mime.IMimeType; //导入依赖的package包/类
@Test
public void testKnownSpecial ()
{
  final Set <IMimeType> aAllKnown = MimeTypeInfoManager.getDefaultInstance ().getAllMimeTypes ();
  assertTrue (aAllKnown.contains (CMimeType.APPLICATION_MS_WORD));
  assertTrue (aAllKnown.contains (CMimeType.APPLICATION_MS_WORD_2007));
  assertTrue (aAllKnown.contains (CMimeType.APPLICATION_MS_EXCEL));
  assertTrue (aAllKnown.contains (CMimeType.APPLICATION_MS_EXCEL_2007));
  assertTrue (aAllKnown.contains (CMimeType.APPLICATION_MS_POWERPOINT));
  assertTrue (aAllKnown.contains (CMimeType.APPLICATION_MS_POWERPOINT_2007));
  assertTrue (aAllKnown.contains (CMimeType.APPLICATION_OCTET_STREAM));
  assertTrue (aAllKnown.contains (CMimeType.APPLICATION_PDF));
  if (false) // special!
    assertTrue (aAllKnown.contains (CMimeType.APPLICATION_FORCE_DOWNLOAD));
  assertTrue (aAllKnown.contains (CMimeType.APPLICATION_ZIP));
  assertTrue (aAllKnown.contains (CMimeType.APPLICATION_JSON));
  assertTrue (aAllKnown.contains (CMimeType.APPLICATION_ATOM_XML));
  assertTrue (aAllKnown.contains (CMimeType.APPLICATION_RSS_XML));
  assertTrue (aAllKnown.contains (CMimeType.APPLICATION_SHOCKWAVE_FLASH));
  if (false) // not contained
    assertTrue (aAllKnown.contains (CMimeType.APPLICATION_JAVA_APPLET));
  if (false) // special!
    assertTrue (aAllKnown.contains (CMimeType.APPLICATION_X_WWW_FORM_URLENCODED));
  assertTrue (aAllKnown.contains (CMimeType.APPLICATION_XML));

  // audio
  assertTrue (aAllKnown.contains (CMimeType.AUDIO_MP3));

  // images
  assertTrue (aAllKnown.contains (CMimeType.IMAGE_BMP));
  assertTrue (aAllKnown.contains (CMimeType.IMAGE_GIF));
  assertTrue (aAllKnown.contains (CMimeType.IMAGE_JPG));
  assertTrue (aAllKnown.contains (CMimeType.IMAGE_PNG));
  assertTrue (aAllKnown.contains (CMimeType.IMAGE_TIFF));
  assertTrue (aAllKnown.contains (CMimeType.IMAGE_PSD));
  assertTrue (aAllKnown.contains (CMimeType.IMAGE_WEBP));
  assertTrue (aAllKnown.contains (CMimeType.IMAGE_X_ICON));

  // multipart
  if (false) // special
    assertTrue (aAllKnown.contains (CMimeType.MULTIPART_FORMDATA));

  // text
  assertTrue (aAllKnown.contains (CMimeType.TEXT_CSV));
  assertTrue (aAllKnown.contains (CMimeType.TEXT_HTML));
  if (false) // not contained
    assertTrue (aAllKnown.contains (CMimeType.TEXT_HTML_SANDBOXED));
  assertTrue (aAllKnown.contains (CMimeType.TEXT_JAVASCRIPT));
  assertTrue (aAllKnown.contains (CMimeType.TEXT_PLAIN));
  assertTrue (aAllKnown.contains (CMimeType.TEXT_XML));
  assertTrue (aAllKnown.contains (CMimeType.TEXT_CSS));
  if (false) // special
    assertTrue (aAllKnown.contains (CMimeType.TEXT_CONTENT_SECURITY_POLICY));
}
 

开发者ID:phax,
项目名称:ph-commons,
代码行数:55,
代码来源:MimeTypeInfoManagerTest.java

示例20: CSSDataURL

点赞 2

import com.helger.commons.mime.IMimeType; //导入依赖的package包/类
/**
 * Full constructor
 *
 * @param aMimeType
 *        The MIME type to be used. May not be <code>null</code>. If you don't
 *        know provide the default MIME type from
 *        {@link CSSDataURLHelper#DEFAULT_MIME_TYPE}.
 * @param bBase64Encoded
 *        <code>true</code> if the data URL String representation should be
 *        Base64 encoded, <code>false</code> if not. It is recommended to set
 *        this to <code>true</code> if you have binary data like images.
 * @param aContent
 *        The content of the data URL as a byte array. May not be
 *        <code>null</code> but may be empty. This content may not be Base64
 *        encoded!
 * @param aCharset
 *        The charset to be used to encode the String. May not be
 *        <code>null</code>. The default is
 *        {@link CSSDataURLHelper#DEFAULT_CHARSET}.
 * @param sContent
 *        The String representation of the content. It must match the byte
 *        array in the specified charset. If this parameter is
 *        <code>null</code> than the String content representation is lazily
 *        created in {@link #getContentAsString()}.
 */
public CSSDataURL (@Nonnull final IMimeType aMimeType,
                   final boolean bBase64Encoded,
                   @Nonnull final byte [] aContent,
                   @Nonnull final Charset aCharset,
                   @Nullable final String sContent)
{
  ValueEnforcer.notNull (aMimeType, "MimeType");
  ValueEnforcer.notNull (aContent, "Content");
  ValueEnforcer.notNull (aCharset, "Charset");

  // Check if a charset is contained in the MIME type and if it matches the
  // provided charset
  final Charset aMimeTypeCharset = MimeTypeHelper.getCharsetFromMimeType (aMimeType);
  if (aMimeTypeCharset == null)
  {
    // No charset found in MIME type
    if (!aCharset.equals (CSSDataURLHelper.DEFAULT_CHARSET))
    {
      // append charset only if it is not the default charset
      m_aMimeType = ((MimeType) aMimeType.getClone ()).addParameter (CMimeType.PARAMETER_NAME_CHARSET,
                                                                     aCharset.name ());
    }
    else
    {
      // Default charset provided
      m_aMimeType = aMimeType;
    }
  }
  else
  {
    // MIME type has a charset - check if it matches the passed one
    if (!aMimeTypeCharset.equals (aCharset))
      throw new IllegalArgumentException ("The provided charset '" +
                                          aCharset.name () +
                                          "' differs from the charset in the MIME type: '" +
                                          aMimeTypeCharset.name () +
                                          "'");
    m_aMimeType = aMimeType;
  }
  m_bBase64Encoded = bBase64Encoded;
  m_aContent = ArrayHelper.getCopy (aContent);
  m_aCharset = aCharset;
  m_sContent = sContent;
}
 

开发者ID:phax,
项目名称:ph-css,
代码行数:70,
代码来源:CSSDataURL.java

示例21: getMimeType

点赞 2

import com.helger.commons.mime.IMimeType; //导入依赖的package包/类
/**
 * @return The MIME type of the data URL. If none was specified, than the
 *         default MIME Type {@link CSSDataURLHelper#DEFAULT_MIME_TYPE} must
 *         be used.
 */
@Nonnull
public IMimeType getMimeType ()
{
  return m_aMimeType;
}
 

开发者ID:phax,
项目名称:ph-css,
代码行数:11,
代码来源:CSSDataURL.java

示例22: addAttachment

点赞 1

import com.helger.commons.mime.IMimeType; //导入依赖的package包/类
/**
 * Adds a file as attachment to the message.
 *
 * @param aAttachment
 *        Attachment to be added. May not be <code>null</code>.
 * @param aMimeType
 *        MIME type of the given file. May not be <code>null</code>.
 * @return this for chaining
 * @throws IOException
 *         if something goes wrong in the adding process
 */
@Nonnull
public AS4ClientUserMessage addAttachment (@Nonnull final File aAttachment,
                                           @Nonnull final IMimeType aMimeType) throws IOException
{
  return addAttachment (aAttachment, aMimeType, null);
}
 

开发者ID:phax,
项目名称:ph-as4,
代码行数:18,
代码来源:AS4ClientUserMessage.java

示例23: getPrimaryMimeTypeForFilename

点赞 1

import com.helger.commons.mime.IMimeType; //导入依赖的package包/类
/**
 * Get the primary (=first) mime type associated with the specified filename.
 *
 * @param sFilename
 *        The filename to retrieve the primary mime type from. May neither be
 *        <code>null</code> nor empty.
 * @return <code>null</code> if no mime type is associated with the extension
 *         of the passed filename
 */
@Nullable
public IMimeType getPrimaryMimeTypeForFilename (@Nonnull @Nonempty final String sFilename)
{
  ValueEnforcer.notEmpty (sFilename, "Filename");

  final String sExtension = FilenameHelper.getExtension (sFilename);
  return getPrimaryMimeTypeForExtension (sExtension);
}
 

开发者ID:phax,
项目名称:ph-commons,
代码行数:18,
代码来源:MimeTypeInfoManager.java

示例24: getCharsetFromMimeTypeOrDefault

点赞 1

import com.helger.commons.mime.IMimeType; //导入依赖的package包/类
/**
 * Determine the charset from the passed MIME type. If no charset was found,
 * return the default charset.
 *
 * @param aMimeType
 *        The MIME type to investigate.
 * @return Never <code>null</code>.
 */
@Nonnull
public static Charset getCharsetFromMimeTypeOrDefault (@Nullable final IMimeType aMimeType)
{
  final Charset ret = MimeTypeHelper.getCharsetFromMimeType (aMimeType);
  return ret != null ? ret : CSSDataURLHelper.DEFAULT_CHARSET;
}
 

开发者ID:phax,
项目名称:ph-css,
代码行数:15,
代码来源:CSSDataURL.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)