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

    Constructors
    Constructor
    Description
    NacosByteArrayResource(byte[] byteArray)
    Create a new ByteArrayResource.
    NacosByteArrayResource(byte[] byteArray, String description)
    Create a new ByteArrayResource with a description.
  • Method Summary

    Modifier and Type
    Method
    Description
    This implementation always returns null, assuming that this resource type does not have a filename.
    void
    setFilename(String filename)
     

    Methods inherited from class org.springframework.core.io.ByteArrayResource

    contentLength, equals, exists, getByteArray, getContentAsByteArray, getContentAsString, getDescription, getInputStream, hashCode

    Methods inherited from class org.springframework.core.io.AbstractResource

    createRelative, getFile, getFileForLastModifiedCheck, getURI, getURL, isFile, isOpen, isReadable, lastModified, readableChannel, toString

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • NacosByteArrayResource

      public NacosByteArrayResource(byte[] byteArray)
      Create a new ByteArrayResource.
      Parameters:
      byteArray - the byte array to wrap
    • NacosByteArrayResource

      public NacosByteArrayResource(byte[] byteArray, String description)
      Create a new ByteArrayResource with a description.
      Parameters:
      byteArray - the byte array to wrap
      description - where the byte array comes from
  • Method Details

    • setFilename

      public void setFilename(String filename)
    • getFilename

      public String getFilename()
      This implementation always returns null, assuming that this resource type does not have a filename.
      Specified by:
      getFilename in interface org.springframework.core.io.Resource
      Overrides:
      getFilename in class org.springframework.core.io.AbstractResource