|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.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
- OutputStreampublic 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 |