|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.gauce.common.CommonUtil
Gauce에서 공통적으로 사용되는 Utility를 모아둔 Class
| Constructor Summary | |
CommonUtil()
|
|
| Method Summary | |
static int |
b2Int(byte[] b)
입력된 4바이트를 int값으로 변환하여 반환한다. |
static long |
b2long(byte[] b)
입력된 8바이트를 long값으로 변환하여 반환한다. |
static char[] |
byte2Char(byte[] bytes,
java.lang.String encoding)
지정된 byte[] 배열을 char[] 배열로 변환하여 반환한다. |
static byte[] |
compress(byte[] b)
지정된 Byte를 HUFFMAN_ONLY 압축방식으로 압축한다, 압축 레벨은 BEST_COMPRESSION을 사용한다. |
static char[] |
compress(char[] c)
생성된 GauceDataSet의 Data부분을 압축한다. |
static void |
copy(java.io.InputStream in,
java.io.OutputStream out)
InputStream을 OutputStream으로 출력한다. |
static void |
copy(java.io.InputStream in,
java.io.OutputStream out,
int bufSize)
InputStream을 OutputStream으로 출력한다. |
static byte[] |
deCompress(byte[] b)
압축된 byte배열을 풀어서 반환한다. |
static java.lang.String |
installDir()
Gacue의 설치 디렉터리를 반환한다. |
static byte[] |
int2B(int v)
int값을 4바이트 값으로 변환한다. |
static java.lang.String[][] |
loadCSV(java.io.InputStream is)
CSV File을 읽어서 String배열로 반환한다. |
static java.lang.String[][] |
loadCSV(java.io.InputStream is,
java.lang.String enc)
CSV File을 읽어서 String배열로 반환한다. |
static void |
skip(java.io.InputStream in,
int size)
size크기 만큼의 buffer를 생성하여 InputStream을 skip()한다. |
static byte[] |
toPacketNumber(int num)
정의된 int숫자를 10바이트의 문자형 숫자로 변환한다. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public CommonUtil()
| Method Detail |
public static final void copy(java.io.InputStream in,
java.io.OutputStream out)
in - InputStreamout - OutputStream
public static final void copy(java.io.InputStream in,
java.io.OutputStream out,
int bufSize)
in - InputStreamout - OutputStreambufSize - 버퍼의 크기
public static final java.lang.String installDir()
throws java.io.IOException
이 디렉터리는 Gauce를 설치할 때 지정한 디렉터리를 말한다.
java.io.IOException - 설치디렉터리를 읽는 동안 발생하는 오류public static final int b2Int(byte[] b)
b - 변환할 4바이트 값
public static final long b2long(byte[] b)
b - 변환할 8바이트 값
public static final byte[] int2B(int v)
v - 변환할 int값
public static final char[] byte2Char(byte[] bytes,
java.lang.String encoding)
bytes - 변환할 byte[]배열encoding - 생성할 char[]배열에 대한 인코딩 정보
public static final byte[] compress(byte[] b)
b - 압축할 byte배열
public static final char[] compress(char[] c)
c - 압축할 byte배열
public static final byte[] deCompress(byte[] b)
b - 압축된 byte배열
public static final byte[] toPacketNumber(int num)
예를 들면 123의 숫자를 변경하면 0000000123과 같이 변경된다.
num - 변경할 숫자
public static final java.lang.String[][] loadCSV(java.io.InputStream is)
throws java.io.IOException
is - CSV를 읽을 InputStream
java.io.IOException - CSV파일을 읽는 동안 발생하는 오류
public static final java.lang.String[][] loadCSV(java.io.InputStream is,
java.lang.String enc)
throws java.io.IOException
is - CSV를 읽을 InputStreamenc - String을 읽을 때 적용할 인코딩
java.io.IOException - CSV파일을 읽는 동안 발생하는 오류
public static final void skip(java.io.InputStream in,
int size)
in - InputStreamsize - read()할 사이즈
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||