对于CloudBlockBlob类型
,方法startCopy(URL)未定义
编译以下代码时出现上述错误 -
import com.microsoft.azure.storage.CloudStorageAccount;
import com.microsoft.azure.storage.blob.CloudBlob;
import com.microsoft.azure.storage.blob.CloudBlobClient;
import com.microsoft.azure.storage.blob.CloudBlobContainer;
import com.microsoft.azure.storage.blob.CloudBlockBlob;
public class CopyFromURLToBlob {
public static final String storageConnectionString = "xyz" ;
public static void main(String[] args) {
String connectionString = String.format(storageConnectionString);
CloudStorageAccount account = CloudStorageAccount.parse(connectionString);
CloudBlobClient client = account.createCloudBlobClient();
CloudBlobContainer container = client.getContainerReference("dbpcontent");
CloudBlockBlob blob = container.getBlockBlobReference("directcopytoblobfromUrl.txt");
String url = "http://downloads.dbpedia.org/2016-10/dbpedia_2016-10.owl";
blob.startCopy(new URL(url));
}}