本文整理匯總了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);
}