本文整理了Java中org.jclouds.io.Payload.getInput()
方法的一些代码示例,展示了Payload.getInput()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Payload.getInput()
方法的具体详情如下:
包路径:org.jclouds.io.Payload
类名称:Payload
方法名:getInput
[英]Creates a new InputStream object of the payload.
[中]创建有效负载的新InputStream对象。
代码示例来源:origin: rackerlabs/blueflood
public String call() throws Exception {
Blob blob = store.getBlob(container, name);
Payload payload = blob.getPayload();
InputStream is = payload.getInput();
File tempFile = new File(downloadDir, name + ".tmp");
Timer.Context downloadContext = downloadTimer.time();
代码示例来源:origin: io.cloudsoft.jclouds/jclouds-core
/**
* {@inheritDoc}
*/
@Override
public Object getRawContent() {
return delegate.getInput();
}
代码示例来源:origin: org.jclouds/jclouds-core
/**
* {@inheritDoc}
*/
@Override
public Object getRawContent() {
return delegate.getInput();
}
代码示例来源:origin: jclouds/legacy-jclouds
/**
* {@inheritDoc}
*/
@Override
public InputStream getInput() {
return delegate.getInput();
}
代码示例来源:origin: jclouds/legacy-jclouds
/**
* {@inheritDoc}
*/
@Override
public Object getRawContent() {
return delegate.getInput();
}
代码示例来源:origin: jclouds/legacy-jclouds
@Override
public Void create() throws Exception {
sftp = acquire(sftpConnection);
InputStream is = checkNotNull(contents.getInput(), "inputstream for path %s", path);
try {
sftp.put(is, path);
} finally {
Closeables.closeQuietly(contents);
}
return null;
}
代码示例来源:origin: jclouds/legacy-jclouds
public InputStream apply(HttpResponse from) {
return from.getPayload() != null ? from.getPayload().getInput() : null;
}
}
代码示例来源:origin: jclouds/legacy-jclouds
/**
* parses the http response headers to create a new {@link BoundedSet} object.
*/
public BoundedSet<DirectoryEntry> apply(HttpResponse from) {
checkNotNull(from, "http response");
String token = from.getFirstHeaderOrNull(AtmosHeaders.TOKEN);
return new BoundedLinkedHashSet<DirectoryEntry>(factory.create(listHandlerProvider.get()).parse(
from.getPayload().getInput()), token);
}
}
代码示例来源:origin: org.apache.whirr/whirr-core
@Override
public Cluster load() throws IOException {
Blob blob = context.getBlobStore().getBlob(container, blobName);
if (blob != null) {
return unserialize(spec,
IOUtils.toString(blob.getPayload().getInput(), "utf-8"));
}
return null;
}
代码示例来源:origin: org.jclouds.api/atmos
/**
* parses the http response headers to create a new {@link BoundedSet} object.
*/
public BoundedSet<DirectoryEntry> apply(HttpResponse from) {
checkNotNull(from, "http response");
String token = from.getFirstHeaderOrNull(AtmosHeaders.TOKEN);
return new BoundedLinkedHashSet<DirectoryEntry>(factory.create(listHandlerProvider.get()).parse(
from.getPayload().getInput()), token);
}
}
代码示例来源:origin: io.cloudsoft.jclouds.api/atmos
/**
* parses the http response headers to create a new {@link BoundedSet} object.
*/
public BoundedSet<DirectoryEntry> apply(HttpResponse from) {
checkNotNull(from, "http response");
String token = from.getFirstHeaderOrNull(AtmosHeaders.TOKEN);
return new BoundedLinkedHashSet<DirectoryEntry>(factory.create(listHandlerProvider.get()).parse(
from.getPayload().getInput()), token);
}
}
代码示例来源:origin: org.apache.jclouds.api/atmos
/**
* parses the http response headers to create a new {@link BoundedSet} object.
*/
public BoundedSet<DirectoryEntry> apply(HttpResponse from) {
checkNotNull(from, "http response");
String token = from.getFirstHeaderOrNull(AtmosHeaders.TOKEN);
return new BoundedLinkedHashSet<DirectoryEntry>(factory.create(listHandlerProvider.get()).parse(
from.getPayload().getInput()), token);
}
}
代码示例来源:origin: jclouds/legacy-jclouds
@Override
protected HttpUriRequest convert(HttpRequest request) throws IOException {
HttpUriRequest returnVal = apacheHCUtils.convertToApacheRequest(request);
if (request.getPayload() != null && request.getPayload().getContentMetadata().getContentMD5() != null){
String md5 = base64().encode(asByteSource(request.getPayload().getInput()).hash(md5()).asBytes());
returnVal.addHeader("Content-MD5", md5);
}
return returnVal;
}
代码示例来源:origin: Nextdoor/bender
public void input(PayloadEnclosing request) {
Payload oldContent = request.getPayload();
Payload wiredPayload;
if (!oldContent.isSensitive() || isLogSensitiveInformation()) {
wiredPayload = newPayload(input(oldContent.getInput()));
} else {
wiredPayload = newPayload(oldContent.getInput());
}
wiredPayload.setSensitive(oldContent.isSensitive());
copyPayloadMetadata(oldContent, wiredPayload);
request.setPayload(wiredPayload);
}
代码示例来源:origin: com.amysta.jclouds/jclouds-core
public void input(PayloadEnclosing request) {
Payload oldContent = request.getPayload();
Payload wiredPayload;
if (!oldContent.isSensitive() || isLogSensitiveInformation()) {
wiredPayload = newPayload(input(oldContent.getInput()));
} else {
wiredPayload = newPayload(oldContent.getInput());
}
wiredPayload.setSensitive(oldContent.isSensitive());
copyPayloadMetadata(oldContent, wiredPayload);
request.setPayload(wiredPayload);
}
代码示例来源:origin: jclouds/legacy-jclouds
public void input(PayloadEnclosing request) {
Payload oldContent = request.getPayload();
Payload wiredPayload = newPayload(input(oldContent.getInput()));
copyPayloadMetadata(oldContent, wiredPayload);
request.setPayload(wiredPayload);
}
代码示例来源:origin: io.cloudsoft.jclouds/jclouds-core
public void input(PayloadEnclosing request) {
Payload oldContent = request.getPayload();
Payload wiredPayload = newPayload(input(oldContent.getInput()));
copyPayloadMetadata(oldContent, wiredPayload);
request.setPayload(wiredPayload);
}
代码示例来源:origin: jclouds/legacy-jclouds
public void output(PayloadEnclosing request) {
Payload oldContent = request.getPayload();
Payload wiredPayload;
try {
wiredPayload = newPayload(output(oldContent.getRawContent()));
} catch (UnsupportedOperationException e) {
wiredPayload = newPayload(output(oldContent.getInput()));
}
copyPayloadMetadata(oldContent, wiredPayload);
request.setPayload(wiredPayload);
}
代码示例来源:origin: io.cloudsoft.jclouds/jclouds-core
public void output(PayloadEnclosing request) {
Payload oldContent = request.getPayload();
Payload wiredPayload;
try {
wiredPayload = newPayload(output(oldContent.getRawContent()));
} catch (UnsupportedOperationException e) {
wiredPayload = newPayload(output(oldContent.getInput()));
}
copyPayloadMetadata(oldContent, wiredPayload);
request.setPayload(wiredPayload);
}
代码示例来源:origin: org.jclouds/jclouds-core
public void output(PayloadEnclosing request) {
Payload oldContent = request.getPayload();
Payload wiredPayload;
try {
wiredPayload = newPayload(output(oldContent.getRawContent()));
} catch (UnsupportedOperationException e) {
wiredPayload = newPayload(output(oldContent.getInput()));
}
copyPayloadMetadata(oldContent, wiredPayload);
request.setPayload(wiredPayload);
}
内容来源于网络,如有侵权,请联系作者删除!