Class OutputStreamResource

  • All Implemented Interfaces:
    org.springframework.core.io.InputStreamSource, org.springframework.core.io.Resource, org.springframework.core.io.WritableResource

    public class OutputStreamResource
    extends org.springframework.core.io.AbstractResource
    implements org.springframework.core.io.WritableResource
    • Constructor Summary

      Constructors 
      Constructor Description
      OutputStreamResource​(java.io.OutputStream outStream, java.lang.String filename, java.lang.String desc)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      java.lang.String getDescription()  
      java.lang.String getFilename()  
      java.io.InputStream getInputStream()  
      java.io.OutputStream getOutputStream()  
      int hashCode()  
      boolean isWritable()  
      • Methods inherited from class org.springframework.core.io.AbstractResource

        contentLength, createRelative, exists, 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
      • Methods inherited from interface org.springframework.core.io.Resource

        contentLength, createRelative, exists, getFile, getURI, getURL, isFile, isOpen, isReadable, lastModified, readableChannel
      • Methods inherited from interface org.springframework.core.io.WritableResource

        writableChannel
    • Constructor Detail

      • OutputStreamResource

        public OutputStreamResource​(java.io.OutputStream outStream,
                                    java.lang.String filename,
                                    java.lang.String desc)
    • Method Detail

      • getOutputStream

        public java.io.OutputStream getOutputStream()
                                             throws java.io.IOException
        Specified by:
        getOutputStream in interface org.springframework.core.io.WritableResource
        Throws:
        java.io.IOException
      • getDescription

        public java.lang.String getDescription()
        Specified by:
        getDescription in interface org.springframework.core.io.Resource
      • getFilename

        public java.lang.String getFilename()
        Specified by:
        getFilename in interface org.springframework.core.io.Resource
        Overrides:
        getFilename in class org.springframework.core.io.AbstractResource
      • getInputStream

        public java.io.InputStream getInputStream()
                                           throws java.io.IOException
        Specified by:
        getInputStream in interface org.springframework.core.io.InputStreamSource
        Throws:
        java.io.IOException
      • isWritable

        public boolean isWritable()
        Specified by:
        isWritable in interface org.springframework.core.io.WritableResource
      • hashCode

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

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class org.springframework.core.io.AbstractResource