当前位置: 首页>>代码示例>>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;未经允许,请勿转载。