public class BlobStorageResource
extends org.springframework.core.io.AbstractResource
WritableResource for reading and writing objects in Azure
StorageAccount blob. An instance of this class represents a handle to a blob.| Constructor and Description |
|---|
BlobStorageResource(com.azure.storage.blob.BlobServiceClient blobServiceClient,
String location) |
BlobStorageResource(com.azure.storage.blob.BlobServiceClient blobServiceClient,
String location,
Boolean autoCreateFiles) |
BlobStorageResource(com.azure.storage.blob.BlobServiceClient blobServiceClient,
String location,
Boolean autoCreateFiles,
String contentType) |
| Modifier and Type | Method and Description |
|---|---|
long |
contentLength() |
org.springframework.core.io.Resource |
createRelative(String relativePath) |
boolean |
exists() |
String |
getContentType(String location) |
String |
getDescription() |
File |
getFile() |
String |
getFilename() |
InputStream |
getInputStream() |
OutputStream |
getOutputStream() |
URL |
getURL() |
long |
lastModified() |
equals, getFileForLastModifiedCheck, getURI, hashCode, isFile, isOpen, isReadable, readableChannel, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic BlobStorageResource(com.azure.storage.blob.BlobServiceClient blobServiceClient,
String location)
public BlobStorageResource(com.azure.storage.blob.BlobServiceClient blobServiceClient,
String location,
Boolean autoCreateFiles)
public OutputStream getOutputStream() throws IOException
IOExceptionpublic boolean exists()
exists in interface org.springframework.core.io.Resourceexists in class org.springframework.core.io.AbstractResourcepublic URL getURL() throws IOException
getURL in interface org.springframework.core.io.ResourcegetURL in class org.springframework.core.io.AbstractResourceIOExceptionpublic File getFile() throws IOException
getFile in interface org.springframework.core.io.ResourcegetFile in class org.springframework.core.io.AbstractResourceIOExceptionpublic long contentLength()
throws IOException
contentLength in interface org.springframework.core.io.ResourcecontentLength in class org.springframework.core.io.AbstractResourceIOExceptionpublic long lastModified()
throws IOException
lastModified in interface org.springframework.core.io.ResourcelastModified in class org.springframework.core.io.AbstractResourceIOExceptionpublic org.springframework.core.io.Resource createRelative(String relativePath) throws IOException
createRelative in interface org.springframework.core.io.ResourcecreateRelative in class org.springframework.core.io.AbstractResourceIOExceptionpublic String getFilename()
getFilename in interface org.springframework.core.io.ResourcegetFilename in class org.springframework.core.io.AbstractResourcepublic String getDescription()
public InputStream getInputStream() throws IOException
IOExceptionVisit the Azure for Java Developers site for more Java documentation, including quick starts, tutorials, and code samples.