java - Working with Azure Blob Storage , to copy url data to blob? -
the method startcopy(url) undefined type cloudblockblob
getting above error while compiling below code-
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)); }}
Comments
Post a Comment