示例#1
0
 public void refreshObjectMeta(S3Object object) throws IOException {
   if (object.isTransient())
     throw new RuntimeException("transient object cannot updated, check transient status first");
   com.amazon.s3.S3Object obj = awsAuthConnection.head(name, object.getKey(), null).object;
   if (obj == null) object.setTransient(true);
   else object.setMeta(obj.metadata);
 }
示例#2
0
 /**
  * update data for the object
  *
  * @param object
  * @throws IOException
  */
 public void refreshObject(S3Object object) throws IOException {
   com.amazon.s3.S3Object obj = awsAuthConnection.get(name, object.getKey(), null).object;
   object.setTransient(obj == null);
   if (!object.isTransient()) {
     object.setData(obj.data);
     object.setMeta(obj.metadata);
   }
 }