com.bigzip.plugin.compression
Class CompressionToolBox
java.lang.Object
|
+--com.bigzip.plugin.compression.CompressionToolBox
- public class CompressionToolBox
- extends java.lang.Object
Method Summary |
static byte[] |
copyBuffer(byte[] src,
int off,
int len)
Returns the sub-array of an array specified by the length and offset. |
static long |
dosToJavaTime(long dtime)
|
static byte[] |
getUTF8Bytes(java.lang.String s)
|
static java.lang.String |
getUTF8String(byte[] b,
int off,
int len)
Fetches a UTF8-encoded String from the specified byte array. |
static long |
javaToDosTime(long modifiedTimeDate)
|
static void |
quickSort(int[] obj,
int off,
int len)
Standard QuickSort routine that checks to see if it should perform a bubble
sort first before going into a quick sort. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CompressionToolBox
public CompressionToolBox()
copyBuffer
public static byte[] copyBuffer(byte[] src,
int off,
int len)
- Returns the sub-array of an array specified by the length and offset.
dosToJavaTime
public static long dosToJavaTime(long dtime)
javaToDosTime
public static long javaToDosTime(long modifiedTimeDate)
getUTF8Bytes
public static byte[] getUTF8Bytes(java.lang.String s)
- Returns:
- An array of bytes representing the Java string (UTF8 encoding).
getUTF8String
public static java.lang.String getUTF8String(byte[] b,
int off,
int len)
- Fetches a UTF8-encoded String from the specified byte array.
- Parameters:
b
- byte array containing the required stringoff
- starting position of the required string in the arraylen
- the length of the string in the array- Returns:
- Java string (UTF8-encoded)
quickSort
public static void quickSort(int[] obj,
int off,
int len)
- Standard QuickSort routine that checks to see if it should perform a bubble
sort first before going into a quick sort.