Utils.java 文件源码

java
阅读 20 收藏 0 点赞 0 评论 0

项目:portals-pluto 作者:
public boolean checkEqualMimeResponse(MimeResponse injectedPortletArtifact,
      MimeResponse mimeResponse) {
   if (injectedPortletArtifact.equals(mimeResponse)) {
      return true;
   }
   int injectedBufferSize = injectedPortletArtifact.getBufferSize();
   int portletBufferSize = mimeResponse.getBufferSize();
   String injectedCharacterEncoding = injectedPortletArtifact
         .getCharacterEncoding();
   String portletCharacterEncoding = mimeResponse.getCharacterEncoding();
   String injectedContentType = injectedPortletArtifact.getContentType();
   String portletContentType = mimeResponse.getContentType();      

   if (checkEqualResponses(injectedPortletArtifact, mimeResponse)

         && injectedBufferSize == portletBufferSize

         && ((injectedCharacterEncoding == null && portletCharacterEncoding == null) ||
              injectedCharacterEncoding.equals(portletCharacterEncoding))

         && (injectedContentType == null && portletContentType == null) ||
            injectedContentType.equals(portletContentType)

         ) {
      return true;
   } else {
      return false;
   }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号