本文整理了Java中org.jclouds.io.Payload.writeTo()
方法的一些代码示例,展示了Payload.writeTo()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Payload.writeTo()
方法的具体详情如下:
包路径:org.jclouds.io.Payload
类名称:Payload
方法名:writeTo
暂无
代码示例来源:origin: jclouds/legacy-jclouds
/**
* {@inheritDoc}
*/
@Override
public void writeTo(OutputStream outstream) throws IOException {
delegate.writeTo(outstream);
}
代码示例来源:origin: org.jclouds/jclouds-core
/**
* {@inheritDoc}
*/
@Override
public void writeTo(OutputStream outstream) throws IOException {
delegate.writeTo(outstream);
}
代码示例来源:origin: io.cloudsoft.jclouds/jclouds-core
/**
* {@inheritDoc}
*/
@Override
public void writeTo(OutputStream outstream) throws IOException {
delegate.writeTo(outstream);
}
代码示例来源:origin: jclouds/legacy-jclouds
/**
* @param payload
* payload to write
* @param lengthDesc
* what to use in error log when an IOException occurs
* @param connection
* connection to write to
*/
void writePayloadToConnection(Payload payload, Object lengthDesc, HttpURLConnection connection) throws IOException {
connection.setDoOutput(true);
CountingOutputStream out = new CountingOutputStream(connection.getOutputStream());
try {
payload.writeTo(out);
} catch (IOException e) {
logger.error(e, "error after writing %d/%s bytes to %s", out.getCount(), lengthDesc, connection.getURL());
throw e;
}
}
代码示例来源:origin: org.jclouds/jclouds-core
/**
* @param payload
* payload to write
* @param lengthDesc
* what to use in error log when an IOException occurs
* @param connection
* connection to write to
*/
void writePayloadToConnection(Payload payload, Object lengthDesc, HttpURLConnection connection) throws IOException {
connection.setDoOutput(true);
CountingOutputStream out = new CountingOutputStream(connection.getOutputStream());
try {
payload.writeTo(out);
} catch (IOException e) {
logger.error(e, "error after writing %d/%s bytes to %s", out.getCount(), lengthDesc, connection.getURL());
throw e;
}
}
代码示例来源:origin: io.cloudsoft.jclouds/jclouds-core
/**
* @param payload
* payload to write
* @param lengthDesc
* what to use in error log when an IOException occurs
* @param connection
* connection to write to
*/
void writePayloadToConnection(Payload payload, Object lengthDesc, HttpURLConnection connection) throws IOException {
connection.setDoOutput(true);
CountingOutputStream out = new CountingOutputStream(connection.getOutputStream());
try {
payload.writeTo(out);
} catch (IOException e) {
logger.error(e, "error after writing %d/%s bytes to %s", out.getCount(), lengthDesc, connection.getURL());
throw e;
}
}
代码示例来源:origin: jclouds/legacy-jclouds
try {
ByteArrayOutputStream out = new ByteArrayOutputStream();
request.getPayload().writeTo(out);
byte[] array = out.toByteArray();
if (!request.getPayload().isRepeatable()) {
代码示例来源:origin: jclouds/legacy-jclouds
MutableContentMetadata oldMd = in.getPayload().getContentMetadata();
ByteArrayOutputStream out = new ByteArrayOutputStream();
in.getPayload().writeTo(out);
payload = (ByteArrayPayload) Payloads.calculateMD5(Payloads.newPayload(out.toByteArray()));
HttpUtils.copy(oldMd, payload.getContentMetadata());
代码示例来源:origin: org.jclouds/jclouds-blobstore
MutableContentMetadata oldMd = in.getPayload().getContentMetadata();
ByteArrayOutputStream out = new ByteArrayOutputStream();
in.getPayload().writeTo(out);
payload = (ByteArrayPayload) Payloads.calculateMD5(Payloads.newPayload(out.toByteArray()));
HttpUtils.copy(oldMd, payload.getContentMetadata());
代码示例来源:origin: io.cloudsoft.jclouds/jclouds-blobstore
MutableContentMetadata oldMd = in.getPayload().getContentMetadata();
ByteArrayOutputStream out = new ByteArrayOutputStream();
in.getPayload().writeTo(out);
payload = (ByteArrayPayload) Payloads.calculateMD5(Payloads.newPayload(out.toByteArray()));
HttpUtils.copy(oldMd, payload.getContentMetadata());
内容来源于网络,如有侵权,请联系作者删除!