Skip navigation links


com.essbase.eas.utils
Class Compression

java.lang.Object
  extended by com.essbase.eas.utils.Compression


public class Compression
extends java.lang.Object
Since:
6.2.0
Version:
7.0.0
Author:
Hung Vo

Constructor Summary
Compression()
           

 

Method Summary
 byte[] deflate(byte[] bytes)
          Compress the bytes
 byte[] deflate(java.lang.String data)
          Compress the string
 java.io.ByteArrayOutputStream deflateToStream(byte[] bytes)
          Compress the bytes to a byte strream
static java.io.ByteArrayOutputStream deflateToStream(java.io.File data)
          Compress the file contents to a byte strream
 java.io.ByteArrayOutputStream deflateToStream(java.lang.String data)
          Compress the string to a byte strream
 int getCompresedLength()
           
static java.lang.String inflate(byte[] data)
           
static java.lang.String inflate(java.io.InputStream in)
           
static java.io.File inflateToFile(java.io.File output, java.io.InputStream in)
           
static java.io.File inflateToFile(java.io.File output, java.io.InputStream in, boolean append)
           
static java.io.File inflateToFile(java.io.InputStream in)
           
static void inflateToFile(java.io.OutputStream out, byte[] bytes)
           
static void inflateToFile(java.io.OutputStream out, java.io.InputStream in)
           

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

Compression

public Compression()

Method Detail

inflate

public static java.lang.String inflate(java.io.InputStream in)
Parameters:
in -
Returns:
inflated string

inflate

public static java.lang.String inflate(byte[] data)
Parameters:
data -
Returns:
inflated string

inflateToFile

public static java.io.File inflateToFile(java.io.File output,
                                         java.io.InputStream in,
                                         boolean append)
                                  throws java.lang.Exception
Parameters:
output - - output file
in - - input stream
append - - if true append to the file if exists
Returns:
- the output file
Throws:
java.lang.Exception

inflateToFile

public static void inflateToFile(java.io.OutputStream out,
                                 java.io.InputStream in)
                          throws java.lang.Exception
Parameters:
output - - output file
in - - input stream
append - - if true append to the file if exists
Throws:
java.lang.Exception

inflateToFile

public static void inflateToFile(java.io.OutputStream out,
                                 byte[] bytes)
                          throws java.lang.Exception
Parameters:
output - - output file
in - - input stream
append - - if true append to the file if exists
Throws:
java.lang.Exception

inflateToFile

public static java.io.File inflateToFile(java.io.File output,
                                         java.io.InputStream in)
                                  throws java.lang.Exception
Parameters:
output - - output file
in - - input stream
Returns:
- output file
Throws:
java.lang.Exception

inflateToFile

public static java.io.File inflateToFile(java.io.InputStream in)
                                  throws java.lang.Exception
Parameters:
in - - input stream
Returns:
- the output file
Throws:
java.lang.Exception

deflate

public byte[] deflate(java.lang.String data)
Compress the string
Parameters:
data - the string to compress
Returns:
compressed bytes

deflate

public byte[] deflate(byte[] bytes)
Compress the bytes
Parameters:
bytes - bytes to compress
Returns:
compressed bytes

deflateToStream

public java.io.ByteArrayOutputStream deflateToStream(java.lang.String data)
Compress the string to a byte strream
Parameters:
data - String to compress
Returns:
the byte array output stream

deflateToStream

public java.io.ByteArrayOutputStream deflateToStream(byte[] bytes)
Compress the bytes to a byte strream
Parameters:
bytes - bytes to compress
Returns:
the byte array output stream

deflateToStream

public static java.io.ByteArrayOutputStream deflateToStream(java.io.File data)
Compress the file contents to a byte strream
Parameters:
data - file to compress
Returns:
the byte array output stream

getCompresedLength

public int getCompresedLength()

Skip navigation links


Copyright © 2001, 2012, Oracle. All rights reserved.