Class ResourceInfo


  • public class ResourceInfo
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected byte[] data
      The direct data as alternative to the path.
      protected java.util.Map<java.lang.String,​java.lang.String> headers
      The headers.
      protected java.lang.String mediatype
      The media type.
      protected java.lang.String path
      The resource file path.
      protected java.lang.Integer status
      The response http state.
    • Constructor Summary

      Constructors 
      Constructor Description
      ResourceInfo​(byte[] data, java.lang.String mediatype)
      Create a new ResourceInfo.
      ResourceInfo​(byte[] data, java.lang.String mediatype, java.lang.Integer status)
      Create a new ResourceInfo.
      ResourceInfo​(java.lang.String path, java.lang.String mediatype)
      Create a new ResourceInfo.
      ResourceInfo​(java.lang.String path, java.lang.String mediatype, java.lang.Integer status)
      Create a new ResourceInfo.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      byte[] getData()
      Get the data.
      java.util.Map<java.lang.String,​java.lang.String> getHeaders()
      Get the response headers (if any).
      java.lang.String getMediatype()
      Get the mediatype.
      java.lang.String getPath()
      Get the path.
      java.lang.Integer getStatus()
      Get the state.
      void setData​(byte[] data)
      Set the data.
      void setHeaders​(java.util.Map<java.lang.String,​java.lang.String> headers)
      Set the response headers.
      void setMediatype​(java.lang.String mediatype)
      Set the mediatype.
      void setPath​(java.lang.String path)
      Set the path.
      void setStatus​(java.lang.Integer status)
      Set the state.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • path

        protected java.lang.String path
        The resource file path.
      • data

        protected byte[] data
        The direct data as alternative to the path.
      • mediatype

        protected java.lang.String mediatype
        The media type.
      • status

        protected java.lang.Integer status
        The response http state.
      • headers

        protected java.util.Map<java.lang.String,​java.lang.String> headers
        The headers.
    • Constructor Detail

      • ResourceInfo

        public ResourceInfo​(java.lang.String path,
                            java.lang.String mediatype)
        Create a new ResourceInfo.
      • ResourceInfo

        public ResourceInfo​(byte[] data,
                            java.lang.String mediatype)
        Create a new ResourceInfo.
      • ResourceInfo

        public ResourceInfo​(java.lang.String path,
                            java.lang.String mediatype,
                            java.lang.Integer status)
        Create a new ResourceInfo.
      • ResourceInfo

        public ResourceInfo​(byte[] data,
                            java.lang.String mediatype,
                            java.lang.Integer status)
        Create a new ResourceInfo.
    • Method Detail

      • getMediatype

        public java.lang.String getMediatype()
        Get the mediatype. return The mediatype.
      • setMediatype

        public void setMediatype​(java.lang.String mediatype)
        Set the mediatype.
        Parameters:
        mediatype - The mediatype to set.
      • getPath

        public java.lang.String getPath()
        Get the path. return The path.
      • setPath

        public void setPath​(java.lang.String path)
        Set the path.
        Parameters:
        path - The path to set.
      • getData

        public byte[] getData()
        Get the data. return The data.
      • setData

        public void setData​(byte[] data)
        Set the data.
        Parameters:
        data - The data to set.
      • getStatus

        public java.lang.Integer getStatus()
        Get the state.
        Returns:
        The state.
      • setStatus

        public void setStatus​(java.lang.Integer status)
        Set the state.
        Parameters:
        state - The state to set.
      • getHeaders

        public java.util.Map<java.lang.String,​java.lang.String> getHeaders()
        Get the response headers (if any).
      • setHeaders

        public void setHeaders​(java.util.Map<java.lang.String,​java.lang.String> headers)
        Set the response headers.