Class SpringResourceLocation.SpringResource

java.lang.Object
org.nutz.resource.NutResource
tech.riemann.nif.nutz.dao.SpringResourceLocation.SpringResource
All Implemented Interfaces:
Comparable<org.nutz.resource.NutResource>
Enclosing class:
SpringResourceLocation

public class SpringResourceLocation.SpringResource extends org.nutz.resource.NutResource
Spring资源包装类,将Spring的Resource对象封装为Nutz框架的NutResource对象
Author:
Kerbores(kerbores@gmail.com)
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected org.springframework.core.io.Resource
    被封装的Spring资源对象

    Fields inherited from class org.nutz.resource.NutResource

    name, priority, source
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    获取资源的输入流
    int
     

    Methods inherited from class org.nutz.resource.NutResource

    compareTo, getName, getPriority, getReader, getSource, setName, setPriority, setSource, toString

    Methods inherited from class Object

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

    • resource

      protected org.springframework.core.io.Resource resource
      被封装的Spring资源对象
  • Constructor Details

    • SpringResource

      public SpringResource()
  • Method Details

    • getInputStream

      public InputStream getInputStream() throws IOException
      获取资源的输入流
      Specified by:
      getInputStream in class org.nutz.resource.NutResource
      Returns:
      资源内容的输入流
      Throws:
      IOException - 当获取输入流失败时抛出此异常
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class org.nutz.resource.NutResource
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class org.nutz.resource.NutResource