com.stimulsoft.base
Class StiPacker

java.lang.Object
  extended by com.stimulsoft.base.StiPacker

public class StiPacker
extends java.lang.Object

Copyright Stimulsoft


Field Summary
static boolean allowPacking
           
 
Constructor Summary
StiPacker()
           
 
Method Summary
static boolean isPacked(int[] bytes)
          Returns true if the specified byte array is packed.
static byte[] pack(byte[] bytes)
          Packs the byte array.
static java.lang.String packAndEncryptToString(byte[] bytes)
          Packs and encrypts the byte array to the byte64 string.
static byte[] unpack(int[] bytes)
          Unpacks byte array.
static byte[] unpackAndDecrypt(java.lang.String str)
          Unpacks and uncrypts byte array from base64 string.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

allowPacking

public static boolean allowPacking
Constructor Detail

StiPacker

public StiPacker()
Method Detail

pack

public static byte[] pack(byte[] bytes)
                   throws java.io.IOException
Packs the byte array.

Parameters:
bytes -
Returns:
Throws:
java.io.IOException

unpackAndDecrypt

public static byte[] unpackAndDecrypt(java.lang.String str)
                               throws java.security.NoSuchAlgorithmException
Unpacks and uncrypts byte array from base64 string.

Parameters:
str -
Returns:
Throws:
java.security.NoSuchAlgorithmException

unpack

public static byte[] unpack(int[] bytes)
Unpacks byte array.

Parameters:
bytes -
Returns:

isPacked

public static boolean isPacked(int[] bytes)
Returns true if the specified byte array is packed.

Parameters:
bytes -
Returns:

packAndEncryptToString

public static java.lang.String packAndEncryptToString(byte[] bytes)
                                               throws java.io.IOException,
                                                      java.security.NoSuchAlgorithmException
Packs and encrypts the byte array to the byte64 string.

Parameters:
bytes -
Returns:
Throws:
java.io.IOException
java.security.NoSuchAlgorithmException