本文整理汇总了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);
}
示例2: setUp
import org.simpleframework.http.parse.ContentTypeParser; //导入依赖的package包/类
protected void setUp() {
type = new ContentTypeParser();
}
示例3: getContentType
import org.simpleframework.http.parse.ContentTypeParser; //导入依赖的package包/类
public ContentType getContentType() {
return new ContentTypeParser(type);
}
示例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);
}
示例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);
}
示例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);
}