尝试从Storage-blobs-java-v10-quickstart运行简单示例并使用API 参考文档中列出的参考如下:
String accountName = "acsazurestore";
String accountKey = "qjC6s44AmSbAkJ7Xqdsks/jjZDIYRTY8qg...."; [not the full one]
SharedKeyCredentials sharedKeyCredentials = new SharedKeyCredentials(accountName, accountKey);
编译 ( mvn compile exec:java
) 时,程序失败并显示以下错误消息:
Caused by: java.lang.IllegalArgumentException: Input byte array has wrong 4-byte ending unit
at java.util.Base64$Decoder.decode0(Base64.java:704)
at java.util.Base64$Decoder.decode(Base64.java:526)
at java.util.Base64$Decoder.decode(Base64.java:549)
at com.microsoft.azure.storage.blob.SharedKeyCredentials.<init>(SharedKeyCredentials.java:60)
at quickstart.Quickstart.main(Quickstart.java:162)
感谢任何帮助!