org.jclouds.io.Payload.setContentMetadata()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(5.8k)|赞(0)|评价(0)|浏览(148)

本文整理了Java中org.jclouds.io.Payload.setContentMetadata()方法的一些代码示例,展示了Payload.setContentMetadata()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Payload.setContentMetadata()方法的具体详情如下:
包路径:org.jclouds.io.Payload
类名称:Payload
方法名:setContentMetadata

Payload.setContentMetadata介绍

暂无

代码示例

代码示例来源:origin: jclouds/legacy-jclouds

@Override
  public void setContentMetadata(MutableContentMetadata in) {
    delegate.setContentMetadata(in);
  }
}

代码示例来源:origin: io.cloudsoft.jclouds/jclouds-core

@Override
  public void setContentMetadata(MutableContentMetadata in) {
    delegate.setContentMetadata(in);
  }
}

代码示例来源:origin: org.jclouds/jclouds-core

@Override
  public void setContentMetadata(MutableContentMetadata in) {
    delegate.setContentMetadata(in);
  }
}

代码示例来源:origin: Nextdoor/bender

@Override
public void setContentMetadata(MutableContentMetadata in) {
  delegate.setContentMetadata(in);
}

代码示例来源:origin: jclouds/legacy-jclouds

@Override
public void setPayload(Payload data) {
 HttpUtils.copy(data.getContentMetadata(), info);
 data.setContentMetadata(info);
 super.setPayload(data);
}

代码示例来源:origin: org.apache.jclouds.api/swift

@Override
public void setPayload(Payload data) {
 HttpUtils.copy(data.getContentMetadata(), info);
 data.setContentMetadata(info);
 super.setPayload(data);
}

代码示例来源:origin: io.cloudsoft.jclouds.api/swift

@Override
public void setPayload(Payload data) {
 HttpUtils.copy(data.getContentMetadata(), info);
 data.setContentMetadata(info);
 super.setPayload(data);
}

代码示例来源:origin: org.jclouds.api/swift

@Override
public void setPayload(Payload data) {
 HttpUtils.copy(data.getContentMetadata(), info);
 data.setContentMetadata(info);
 super.setPayload(data);
}

代码示例来源:origin: org.apache.jclouds.provider/profitbricks

protected <R extends HttpRequest> R createRequest(R fromRequest, String payload) {
   MutableContentMetadata metadata = new BaseMutableContentMetadata();
   metadata.setContentType(MediaType.TEXT_XML);
   metadata.setContentLength(Long.valueOf(payload.getBytes().length));

   fromRequest.setPayload(payload);
   fromRequest.getPayload().setContentMetadata(metadata);
   return fromRequest;
  }
}

代码示例来源:origin: apache/jclouds

protected <R extends HttpRequest> R createRequest(R fromRequest, String payload) {
   MutableContentMetadata metadata = new BaseMutableContentMetadata();
   metadata.setContentType(MediaType.TEXT_XML);
   metadata.setContentLength(Long.valueOf(payload.getBytes().length));

   fromRequest.setPayload(payload);
   fromRequest.getPayload().setContentMetadata(metadata);
   return fromRequest;
  }
}

代码示例来源:origin: jclouds/legacy-jclouds

protected Payload copyMetadataAndSetLength(Payload input, Payload returnVal, long length) {
 returnVal.setContentMetadata(BaseMutableContentMetadata.fromContentMetadata(input.getContentMetadata()
    .toBuilder().contentLength(length).contentMD5(null).build()));
 return returnVal;
}

代码示例来源:origin: io.cloudsoft.jclouds/jclouds-core

protected Payload copyMetadataAndSetLength(Payload input, Payload returnVal, long length) {
 returnVal.setContentMetadata(BaseMutableContentMetadata.fromContentMetadata(input.getContentMetadata()
    .toBuilder().contentLength(length).contentMD5(null).build()));
 return returnVal;
}

代码示例来源:origin: org.jclouds/jclouds-core

protected Payload copyMetadataAndSetLength(Payload input, Payload returnVal, long length) {
 returnVal.setContentMetadata(BaseMutableContentMetadata.fromContentMetadata(input.getContentMetadata()
    .toBuilder().contentLength(length).contentMD5(null).build()));
 return returnVal;
}

代码示例来源:origin: Nextdoor/bender

private Payload createPayload(byte[] content) {
  Payload payload = null;
  if (content.length > 0) {
   payload = Payloads.newByteArrayPayload(content);
   ContentMetadata cm = metaData.toBuilder().contentLength((long)content.length).contentMD5((HashCode) null).build();
   payload.setContentMetadata(BaseMutableContentMetadata.fromContentMetadata(cm));
  }
  return payload;
}

代码示例来源:origin: Nextdoor/bender

protected Payload copyMetadataAndSetLength(Payload input, Payload returnVal, long length) {
 returnVal.setContentMetadata(BaseMutableContentMetadata.fromContentMetadata(input.getContentMetadata()
    .toBuilder().contentLength(length).contentMD5((HashCode) null).build()));
 return returnVal;
}

代码示例来源:origin: apache/jclouds

private Payload createPayload(byte[] content) {
  Payload payload = null;
  if (content.length > 0) {
   payload = Payloads.newByteArrayPayload(content);
   ContentMetadata cm = metaData.toBuilder().contentLength((long)content.length).contentMD5((HashCode) null).build();
   payload.setContentMetadata(BaseMutableContentMetadata.fromContentMetadata(cm));
  }
  return payload;
}

代码示例来源:origin: com.amysta.jclouds/jclouds-core

protected Payload copyMetadataAndSetLength(Payload input, Payload returnVal, long length) {
 returnVal.setContentMetadata(BaseMutableContentMetadata.fromContentMetadata(input.getContentMetadata()
    .toBuilder().contentLength(length).contentMD5((HashCode) null).build()));
 return returnVal;
}

代码示例来源:origin: io.cloudsoft.jclouds/jclouds-core

private Payload createPayload(byte[] content) {
  Payload payload = null;
  if (content.length > 0) {
   payload = new ByteArrayPayload(content);
   ContentMetadata cm = metaData.toBuilder().contentLength((long)content.length).contentMD5(null).build();
   payload.setContentMetadata(BaseMutableContentMetadata.fromContentMetadata(cm));
  }
  return payload;
}

代码示例来源:origin: com.amysta.jclouds/jclouds-core

private Payload createPayload(byte[] content) {
  Payload payload = null;
  if (content.length > 0) {
   payload = Payloads.newByteArrayPayload(content);
   ContentMetadata cm = metaData.toBuilder().contentLength((long)content.length).contentMD5((HashCode) null).build();
   payload.setContentMetadata(BaseMutableContentMetadata.fromContentMetadata(cm));
  }
  return payload;
}

代码示例来源:origin: com.commercehub.jclouds/jclouds-gridfs-blobstore

@Override
  public Blob apply(GridFSDBFile input) {
    MutableBlobMetadata blobMetadata = dbFileToBlobMetadata.apply(input);
    Payload payload = Payloads.newInputStreamPayload(input.getInputStream());
    payload.setContentMetadata(blobMetadata.getContentMetadata());
    Blob blob = blobFactory.create(blobMetadata);
    blob.setPayload(payload);
    return blob;
  }
}

相关文章