Package com.alibaba.cloud.nacos.parser
Class NacosByteArrayResource
java.lang.Object
org.springframework.core.io.AbstractResource
org.springframework.core.io.ByteArrayResource
com.alibaba.cloud.nacos.parser.NacosByteArrayResource
- All Implemented Interfaces:
org.springframework.core.io.InputStreamSource,org.springframework.core.io.Resource
public class NacosByteArrayResource
extends org.springframework.core.io.ByteArrayResource
Nacos-specific resource.
- Author:
- zkz
-
Constructor Summary
ConstructorsConstructorDescriptionNacosByteArrayResource(byte[] byteArray) Create a newByteArrayResource.NacosByteArrayResource(byte[] byteArray, String description) Create a newByteArrayResourcewith a description. -
Method Summary
Modifier and TypeMethodDescriptionThis implementation always returnsnull, assuming that this resource type does not have a filename.voidsetFilename(String filename) Methods inherited from class org.springframework.core.io.ByteArrayResource
contentLength, equals, exists, getByteArray, getContentAsByteArray, getContentAsString, getDescription, getInputStream, hashCodeMethods inherited from class org.springframework.core.io.AbstractResource
createRelative, getFile, getFileForLastModifiedCheck, getURI, getURL, isFile, isOpen, isReadable, lastModified, readableChannel, toString
-
Constructor Details
-
NacosByteArrayResource
public NacosByteArrayResource(byte[] byteArray) Create a newByteArrayResource.- Parameters:
byteArray- the byte array to wrap
-
NacosByteArrayResource
Create a newByteArrayResourcewith a description.- Parameters:
byteArray- the byte array to wrapdescription- where the byte array comes from
-
-
Method Details
-
setFilename
-
getFilename
This implementation always returnsnull, assuming that this resource type does not have a filename.- Specified by:
getFilenamein interfaceorg.springframework.core.io.Resource- Overrides:
getFilenamein classorg.springframework.core.io.AbstractResource
-