public Blob newBlob(String name) {

    MutableBlobMetadataImpl mutableBlobMetadataImpl = new MutableBlobMetadataImpl();
    mutableBlobMetadataImpl.setName(name);
    mutableBlobMetadataImpl.setType(StorageType.BLOB);

    Blob blob = new BlobImpl(mutableBlobMetadataImpl);

    return blob;
  }
 private MutableBlobMetadataImpl generateJcloudsMetadata(
     StorageObjectMetadata storageObjectMetadata) {
   MutableBlobMetadataImpl mutableBlobMetadataImpl = new MutableBlobMetadataImpl();
   mutableBlobMetadataImpl.setName(storageObjectMetadata.getPathAndName());
   if (storageObjectMetadata.isFile()) {
     mutableBlobMetadataImpl.setType(StorageType.BLOB);
   } else if (storageObjectMetadata.isDirectory()) {
     mutableBlobMetadataImpl.setType(StorageType.FOLDER);
   } else if (storageObjectMetadata.isContainer()) {
     mutableBlobMetadataImpl.setType(StorageType.CONTAINER);
   }
   mutableBlobMetadataImpl
       .getContentMetadata()
       .setContentLength(storageObjectMetadata.getLength());
   mutableBlobMetadataImpl.setLastModified(storageObjectMetadata.getLastModified());
   if (storageObjectMetadata.getMd5hash() != null) {
     mutableBlobMetadataImpl.setETag(storageObjectMetadata.getMd5hash());
   }
   return mutableBlobMetadataImpl;
 }