public class FileStorageResource
extends org.springframework.core.io.AbstractResource
WritableResource
for reading and writing objects in Azure
StorageAccount file. An instance of this class represents a handle to a file.Constructor and Description |
---|
FileStorageResource(com.azure.storage.file.share.ShareServiceClient shareServiceClient,
String location) |
Modifier and Type | Method and Description |
---|---|
long |
contentLength() |
org.springframework.core.io.Resource |
createRelative(String relativePath) |
boolean |
exists() |
String |
getDescription() |
File |
getFile() |
String |
getFilename() |
InputStream |
getInputStream() |
OutputStream |
getOutputStream() |
URL |
getURL() |
long |
lastModified() |
equals, getFileForLastModifiedCheck, getURI, hashCode, isFile, isOpen, isReadable, readableChannel, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
public FileStorageResource(com.azure.storage.file.share.ShareServiceClient shareServiceClient, String location)
public OutputStream getOutputStream() throws IOException
IOException
public boolean exists()
exists
in interface org.springframework.core.io.Resource
exists
in class org.springframework.core.io.AbstractResource
public URL getURL() throws IOException
getURL
in interface org.springframework.core.io.Resource
getURL
in class org.springframework.core.io.AbstractResource
IOException
public File getFile()
getFile
in interface org.springframework.core.io.Resource
getFile
in class org.springframework.core.io.AbstractResource
public long contentLength()
contentLength
in interface org.springframework.core.io.Resource
contentLength
in class org.springframework.core.io.AbstractResource
public long lastModified()
lastModified
in interface org.springframework.core.io.Resource
lastModified
in class org.springframework.core.io.AbstractResource
public org.springframework.core.io.Resource createRelative(String relativePath)
createRelative
in interface org.springframework.core.io.Resource
createRelative
in class org.springframework.core.io.AbstractResource
public String getFilename()
getFilename
in interface org.springframework.core.io.Resource
getFilename
in class org.springframework.core.io.AbstractResource
public String getDescription()
public InputStream getInputStream() throws IOException
IOException
Copyright © 2021 Microsoft Corporation. All rights reserved.