Package com.stimulsoft.base
Class StiPacker
java.lang.Object
com.stimulsoft.base.StiPacker
Copyright Stimulsoft
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisPacked(int[] bytes) Returns true if the specified byte array is packed.static byte[]pack(byte[] bytes) Packs the byte array.static StringpackAndEncryptToString(byte[] bytes) Packs and encrypts the byte array to the byte64 string.static byte[]unpack(int[] bytes) Unpacks byte array.static byte[]unpackAndDecrypt(String str) Unpacks and uncrypts byte array from base64 string.
-
Field Details
-
allowPacking
public static boolean allowPacking
-
-
Constructor Details
-
StiPacker
public StiPacker()
-
-
Method Details
-
pack
Packs the byte array.- Parameters:
bytes-- Returns:
- Throws:
IOException
-
unpackAndDecrypt
Unpacks and uncrypts byte array from base64 string.- Parameters:
str-- Returns:
- Throws:
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 String packAndEncryptToString(byte[] bytes) throws IOException, NoSuchAlgorithmException Packs and encrypts the byte array to the byte64 string.- Parameters:
bytes-- Returns:
- Throws:
IOExceptionNoSuchAlgorithmException
-