本文整理汇总了Java中eu.fusepool.p3.transformer.HttpRequestEntity.getData方法的典型用法代码示例。如果您正苦于以下问题:Java HttpRequestEntity.getData方法的具体用法?Java HttpRequestEntity.getData怎么用?Java HttpRequestEntity.getData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类eu.fusepool.p3.transformer.HttpRequestEntity
的用法示例。
在下文中一共展示了HttpRequestEntity.getData方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: transform
import eu.fusepool.p3.transformer.HttpRequestEntity; //导入方法依赖的package包/类
@Override
public Entity transform(HttpRequestEntity entity) throws IOException {
final MimeType mimeType = entity.getType();
final InputStream in = entity.getData();
final Entity output = new WritingEntity() {
@Override
public MimeType getType() {
return mimeType;
}
@Override
public void writeData(OutputStream out) throws IOException {
IOUtils.copy(in, out);
}
};
return output;
}
示例2: generateRdf
import eu.fusepool.p3.transformer.HttpRequestEntity; //导入方法依赖的package包/类
@Override
protected TripleCollection generateRdf(HttpRequestEntity entity) throws IOException {
String rdfDataFormat = SupportedFormat.TURTLE;
InputStream configIn = null;
String queryString = entity.getRequest().getQueryString();
log.info("Query string: " + queryString);
//String configUri = getRequestParamValue(queryString, "config");
String configUri = entity.getRequest().getParameter("config");
log.info("Config file URI: " + configUri);
if(configUri != null) {
configIn = getRemoteConfigFile(configUri);
}
final InputStream inputRdfData = entity.getData();
TripleCollection duplicates = findSameEntities(inputRdfData, rdfDataFormat, configIn);
return duplicates;
}
示例3: transform
import eu.fusepool.p3.transformer.HttpRequestEntity; //导入方法依赖的package包/类
@Override
public Entity transform(HttpRequestEntity entity) throws IOException {
InputStream inputData = entity.getData();
String sedSpec = checkedGet(entity, PAR_SCRIPT);
final String transformed = Unix4j
.from(inputData)
.sed(sedSpec)
.toStringResult();
fLogger.info("transforming inputstream with: " + sedSpec);
return wrapInEntity(transformed);
}