org.skyscreamer.yoga.demo.util
Class GzippedResource

java.lang.Object
  extended by org.springframework.core.io.AbstractResource
      extended by org.springframework.core.io.AbstractFileResolvingResource
          extended by org.springframework.core.io.UrlResource
              extended by org.skyscreamer.yoga.demo.util.GzippedResource
All Implemented Interfaces:
org.springframework.core.io.InputStreamSource, org.springframework.core.io.Resource

public class GzippedResource
extends org.springframework.core.io.UrlResource

Wraps a gzipped Resource so that it decompresses on the fly.

Author:
Carter Page

Constructor Summary
GzippedResource(String path)
           
GzippedResource(URI uri)
           
GzippedResource(URL url)
           
 
Method Summary
 InputStream getInputStream()
           
 
Methods inherited from class org.springframework.core.io.UrlResource
createRelative, equals, getDescription, getFile, getFilename, getURI, getURL, hashCode
 
Methods inherited from class org.springframework.core.io.AbstractFileResolvingResource
getFile, getFileForLastModifiedCheck
 
Methods inherited from class org.springframework.core.io.AbstractResource
exists, isOpen, isReadable, lastModified, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GzippedResource

public GzippedResource(String path)
                throws MalformedURLException
Throws:
MalformedURLException

GzippedResource

public GzippedResource(URI uri)
                throws MalformedURLException
Throws:
MalformedURLException

GzippedResource

public GzippedResource(URL url)
Method Detail

getInputStream

public InputStream getInputStream()
                           throws IOException
Specified by:
getInputStream in interface org.springframework.core.io.InputStreamSource
Overrides:
getInputStream in class org.springframework.core.io.UrlResource
Throws:
IOException


Copyright © 2012. All Rights Reserved.