org.weborganic.berlioz.util
Class ResourceCompressor

java.lang.Object
  extended by org.weborganic.berlioz.util.ResourceCompressor

public final class ResourceCompressor
extends Object

A utility class to compress the contents of a resource.

Since:
Berlioz 0.8.2
Version:
Berlioz 0.9.8 - 8 October 2012
Author:
Christophe Lauret

Method Summary
static byte[] compress(CharSequence content, Charset charset)
          Compresses the specified content.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

compress

public static byte[] compress(CharSequence content,
                              Charset charset)
Compresses the specified content.

Parameters:
content - The content to compress.
charset - The Character set to use to encode the char sequence.
Returns:
The compressed content or an empty array if an error occurred.