本文整理了Java中org.simpleframework.http.Request.getContent
方法的一些代码示例,展示了Request.getContent
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.getContent
方法的具体详情如下:
包路径:org.simpleframework.http.Request
类名称:Request
方法名:getContent
[英]This is used to get the content body. This will essentially get the content from the body and present it as a single string. The encoding of the string is determined from the content type charset value. If the charset is not supported this will throw an exception. Typically only text values should be extracted using this method if there is a need to parse that content.
[中]这用于获取内容正文。这将从正文中获取内容,并将其作为单个字符串呈现。字符串的编码由内容类型字符集值决定。如果不支持该字符集,则会引发异常。通常,如果需要解析文本值,则只应使用此方法提取文本值。
代码示例来源:origin: mpetazzoni/ttorrent
getRequestHandler(response));
} else {
myMultiAnnounceRequestProcessor.process(request.getContent(), request.getAddress().toString(),
request.getClientAddress().getAddress().getHostAddress(), getRequestHandler(response));
代码示例来源:origin: CodeStory/fluent-http
@Override
public String content() throws IOException {
return request.getContent();
}
代码示例来源:origin: ngallagher/simpleframework
/**
* This method attempts to acquire the content of the request
* body. If there is an <code>IOException</code> acquiring the
* content of the body then this will simply return a null
* value without reporting the exception.
*
* @return the content of the body, or null on error
*/
private String getContent() {
try {
return request.getContent();
} catch(Exception e) {
return null;
}
}
代码示例来源:origin: org.simpleframework/simple
/**
* This method attempts to acquire the content of the request
* body. If there is an <code>IOException</code> acquiring the
* content of the body then this will simply return a null
* value without reporting the exception.
*
* @return the content of the body, or null on error
*/
private String getContent() {
try {
return request.getContent();
} catch(Exception e) {
return null;
}
}
代码示例来源:origin: org.simpleframework/simple
/**
* This is used to get the content body. This will essentially get
* the content from the body and present it as a single string.
* The encoding of the string is determined from the content type
* charset value. If the charset is not supported this will throw
* an exception. Typically only text values should be extracted
* using this method if there is a need to parse that content.
*
* @exception IOException signifies that there is an I/O problem
*
* @return the body content as an encoded string value
*/
public String getContent() throws IOException {
return request.getContent();
}
代码示例来源:origin: org.simpleframework/simple-http
/**
* This is used to get the content body. This will essentially get
* the content from the body and present it as a single string.
* The encoding of the string is determined from the content type
* charset value. If the charset is not supported this will throw
* an exception. Typically only text values should be extracted
* using this method if there is a need to parse that content.
*
* @exception IOException signifies that there is an I/O problem
*
* @return the body content as an encoded string value
*/
public String getContent() throws IOException {
return request.getContent();
}
代码示例来源:origin: ngallagher/simpleframework
/**
* This is used to get the content body. This will essentially get
* the content from the body and present it as a single string.
* The encoding of the string is determined from the content type
* charset value. If the charset is not supported this will throw
* an exception. Typically only text values should be extracted
* using this method if there is a need to parse that content.
*
* @exception IOException signifies that there is an I/O problem
*
* @return the body content as an encoded string value
*/
public String getContent() throws IOException {
return request.getContent();
}
代码示例来源:origin: org.simpleframework/simple-http
/**
* This method attempts to acquire the content of the request
* body. If there is an <code>IOException</code> acquiring the
* content of the body then this will simply return a null
* value without reporting the exception.
*
* @return the content of the body, or null on error
*/
private String getContent() {
try {
return request.getContent();
} catch(Exception e) {
return null;
}
}
代码示例来源:origin: org.kie.remote/kie-remote-client
out.print(wsdlContent);
} else if( address.endsWith(DEFAULT_REAL_ENDPOINT) ) {
JaxbCommandsRequest cmdRequest = deserializeAndUnwrapRequest(req.getContent());
内容来源于网络,如有侵权,请联系作者删除!