當前位置: 首頁>>代碼示例>>Java>>正文


Java ContentTypeParser類代碼示例

本文整理匯總了Java中org.simpleframework.http.parse.ContentTypeParser的典型用法代碼示例。如果您正苦於以下問題:Java ContentTypeParser類的具體用法?Java ContentTypeParser怎麽用?Java ContentTypeParser使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ContentTypeParser類屬於org.simpleframework.http.parse包,在下文中一共展示了ContentTypeParser類的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getContentType

import org.simpleframework.http.parse.ContentTypeParser; //導入依賴的package包/類
public ContentType getContentType() {
   String value = getValue("Content-Type");
   
   if(value == null) {
      return null; 
   }
   return new ContentTypeParser(value);
}
 
開發者ID:blobrobotics,項目名稱:bstation,代碼行數:9,代碼來源:MockSegment.java

示例2: setUp

import org.simpleframework.http.parse.ContentTypeParser; //導入依賴的package包/類
protected void setUp() {
   type = new ContentTypeParser();           
}
 
開發者ID:blobrobotics,項目名稱:bstation,代碼行數:4,代碼來源:ContentTypeParserTest.java

示例3: getContentType

import org.simpleframework.http.parse.ContentTypeParser; //導入依賴的package包/類
public ContentType getContentType() {
   return new ContentTypeParser(type);
}
 
開發者ID:blobrobotics,項目名稱:bstation,代碼行數:4,代碼來源:MockRequest.java

示例4: getContentType

import org.simpleframework.http.parse.ContentTypeParser; //導入依賴的package包/類
/**
 * This is a convenience method that can be used to determine the 
 * content type of the message body. This will determine whether
 * there is a <code>Content-Type</code> header, if there is then
 * this will parse that header and represent it as a typed object
 * which will expose the various parts of the HTTP header.
 *
 * @return this returns the content type value if it exists
 */    
public ContentType getContentType() {
   String value = getValue(CONTENT_TYPE);
   
   if(value == null) {
      return null; 
   }
   return new ContentTypeParser(value);
}
 
開發者ID:blobrobotics,項目名稱:bstation,代碼行數:18,代碼來源:ResponseMessage.java

示例5: getContentType

import org.simpleframework.http.parse.ContentTypeParser; //導入依賴的package包/類
/**
 * This is a convenience method that can be used to determine the content
 * type of the message body. This will determine whether there is a
 * <code>Content-Type</code> header, if there is then this will parse that
 * header and represent it as a typed object which will expose the various
 * parts of the HTTP header.
 * 
 * @return this returns the content type value if it exists
 */
@Override
public ContentType getContentType() {
    String value = this.getValue(CONTENT_TYPE);

    if (value == null) return null;
    return new ContentTypeParser(value);
}
 
開發者ID:TehSomeLuigi,項目名稱:someluigis-peripherals,代碼行數:17,代碼來源:ResponseMessage.java

示例6: type

import org.simpleframework.http.parse.ContentTypeParser; //導入依賴的package包/類
/**
 * This is used to parse the content type header header so that the MIME
 * type is available to the segment. This provides an instance of the
 * <code>ContentType</code> object to represent the content type header,
 * which exposes the charset value.
 * 
 * @param value
 *            this is the content type value to parse
 */
protected void type(String value) {
    this.type = new ContentTypeParser(value);
}
 
開發者ID:TehSomeLuigi,項目名稱:someluigis-peripherals,代碼行數:13,代碼來源:SegmentConsumer.java


注:本文中的org.simpleframework.http.parse.ContentTypeParser類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。