Class CompressedResource

All Implemented Interfaces:
Cloneable, Comparable<Resource>, Iterable<Resource>, ResourceCollection
Direct Known Subclasses:
BZip2Resource, GZipResource, XzResource

public abstract class CompressedResource extends ContentTransformingResource
A compressed resource.

Wraps around another resource, delegates all queries (except getSize) to that other resource but uncompresses/compresses streams on the fly.

Since:
Ant 1.7
  • Constructor Details

    • CompressedResource

      protected CompressedResource()
      no arg constructor
    • CompressedResource

      protected CompressedResource(ResourceCollection other)
      Constructor with another resource to wrap.
      Parameters:
      other - the resource to wrap.
  • Method Details

    • toString

      public String toString()
      Get the string representation of this Resource.
      Overrides:
      toString in class Resource
      Returns:
      this Resource formatted as a String.
      Since:
      Ant 1.7
    • getCompressionName

      protected abstract String getCompressionName()
      Get the name of the compression method used.
      Returns:
      the name of the compression method.