Class InMemoryResource

java.lang.Object
org.springframework.core.io.AbstractResource
org.springframework.security.util.InMemoryResource
All Implemented Interfaces:
org.springframework.core.io.InputStreamSource, org.springframework.core.io.Resource

public class InMemoryResource extends org.springframework.core.io.AbstractResource
An in memory implementation of Spring's Resource interface.

Used to create a bean factory from an XML string, rather than a file.

  • Constructor Summary

    Constructors
    Constructor
    Description
    InMemoryResource(byte[] source)
     
    InMemoryResource(byte[] source, @Nullable String description)
     
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    equals(@Nullable Object res)
     
     
     
    int
     

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

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

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.springframework.core.io.Resource

    getContentAsByteArray, getContentAsString, getFilePath
  • Constructor Details

    • InMemoryResource

      public InMemoryResource(String source)
    • InMemoryResource

      public InMemoryResource(byte[] source)
    • InMemoryResource

      public InMemoryResource(byte[] source, @Nullable String description)
  • Method Details

    • getDescription

      public String getDescription()
    • getInputStream

      public InputStream getInputStream()
    • equals

      public boolean equals(@Nullable Object res)
      Overrides:
      equals in class org.springframework.core.io.AbstractResource
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class org.springframework.core.io.AbstractResource