Class WebExternalResourceStream

  • All Implemented Interfaces:
    java.io.Closeable, java.io.Serializable, java.lang.AutoCloseable, org.apache.wicket.util.io.IClusterable, org.apache.wicket.util.resource.IResourceStream, org.apache.wicket.util.watch.IModifiable

    public class WebExternalResourceStream
    extends org.apache.wicket.util.resource.AbstractResourceStream
    An IResourceStream that reads data from a file in the web application
    Author:
    Jean-Baptiste Quenot
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      java.lang.String getContentType()  
      java.io.InputStream getInputStream()  
      org.apache.wicket.util.time.Time lastModifiedTime()  
      org.apache.wicket.util.lang.Bytes length()  
      • Methods inherited from class org.apache.wicket.util.resource.AbstractResourceStream

        getLocale, getStyle, getVariation, setLocale, setStyle, setVariation
      • Methods inherited from class java.lang.Object

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

      • WebExternalResourceStream

        public WebExternalResourceStream​(java.lang.String url)
        Construct.
        Parameters:
        url - the relative url of the external resource
    • Method Detail

      • length

        public org.apache.wicket.util.lang.Bytes length()
        Specified by:
        length in interface org.apache.wicket.util.resource.IResourceStream
        Overrides:
        length in class org.apache.wicket.util.resource.AbstractResourceStream
      • close

        public void close()
                   throws java.io.IOException
        Throws:
        java.io.IOException
      • lastModifiedTime

        public org.apache.wicket.util.time.Time lastModifiedTime()
        Specified by:
        lastModifiedTime in interface org.apache.wicket.util.watch.IModifiable
        Overrides:
        lastModifiedTime in class org.apache.wicket.util.resource.AbstractResourceStream
      • getContentType

        public java.lang.String getContentType()
        Specified by:
        getContentType in interface org.apache.wicket.util.resource.IResourceStream
        Overrides:
        getContentType in class org.apache.wicket.util.resource.AbstractResourceStream
      • getInputStream

        public java.io.InputStream getInputStream()
                                           throws org.apache.wicket.util.resource.ResourceStreamNotFoundException
        Throws:
        org.apache.wicket.util.resource.ResourceStreamNotFoundException