com.poscoict.glueframework.util
Class GlueFileResourceUtil

java.lang.Object
  extended by com.poscoict.glueframework.util.GlueFileResourceUtil

public class GlueFileResourceUtil
extends Object

Resource FileÀÇ URLÀ» ó¸® ÇÏ´Â °øÅë ¸ðµâ.
Weblogic Server¿Í °°ÀÌ File.seperator¸¦ »ç¿ëÇÏÁö ¾Ê°í ÀÚü File Seperator¸¦ »ç¿ëÇÏ´Â WAS¿¡¼­ File.seperator¿¡ ÇØ´ç ÇÏ´Â Seperator·Î º¯È¯ÇÏ¿© Resource¸¦ Á¦°ø


Constructor Summary
GlueFileResourceUtil()
           
 
Method Summary
static List<File> getListOfFiles(File dir)
          Æ¯Á¤ µð·ºÅ丮 ÀÌÇÏ¿¡ Á¸ÀçÇÏ´Â ¸ðµç ÆÄÀϸíÀ» °Ë»öÇؼ­ List CollectionÀ¸·Î ¸®ÅÏÇÑ´Ù.
static List<File> getListOfFiles(File dir, boolean isSub)
           
static URL getResource(String path)
          ÇöÀç ThreadÀÇ Context¿¡ ÇØ´çÇÏ´Â Directory¿¡¼­ path¸¦ URL·Î º¯È¯ÇÔ.
static InputStream getResourceAsStream(String path)
          ÇöÀç ThreadÀÇ Context¿¡ ÇØ´çÇÏ´Â Directory¿¡¼­ path¸¦ URL·Î º¯È¯ÇÔ.
static List<String> readFile(File file)
           
static List<String> readFile(File file, Charset charset)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GlueFileResourceUtil

public GlueFileResourceUtil()
Method Detail

getResource

public static URL getResource(String path)
                       throws GlueException
ÇöÀç ThreadÀÇ Context¿¡ ÇØ´çÇÏ´Â Directory¿¡¼­ path¸¦ URL·Î º¯È¯ÇÔ.
Weblogic Server¿Í °°ÀÌ File.seperator¸¦ »ç¿ëÇÏÁö ¾Ê°í ÀÚü File Seperator¸¦ »ç¿ëÇÏ´Â WAS¿¡¼­ File.seperator¿¡ ÇØ´ç ÇÏ´Â Seperator·Î º¯È¯ÇÏ¿© URL¸¦ ¸®ÅÏÇÔ.

Parameters:
path - String File ¶Ç´Â Directory Path
Returns:
URL path¿¡ ÇØ´çÇÏ´Â URL
Throws:
GlueException

getResourceAsStream

public static InputStream getResourceAsStream(String path)
                                       throws GlueException
ÇöÀç ThreadÀÇ Context¿¡ ÇØ´çÇÏ´Â Directory¿¡¼­ path¸¦ URL·Î º¯È¯ÇÔ.
Weblogic Server¿Í °°ÀÌ File.seperator¸¦ »ç¿ëÇÏÁö ¾Ê°í ÀÚü File Seperator¸¦ »ç¿ëÇÏ´Â WAS¿¡¼­ File.seperator¿¡ ÇØ´ç ÇÏ´Â Seperator·Î º¯È¯ÇÏ¿© InputStreamÀ» ¸®ÅÏÇÔ.

Parameters:
path - String File ¶Ç´Â Directory Path
Returns:
InputStream path¿¡ ÇØ´çÇÏ´Â InputStream
Throws:
GlueException

getListOfFiles

public static List<File> getListOfFiles(File dir)
ƯÁ¤ µð·ºÅ丮 ÀÌÇÏ¿¡ Á¸ÀçÇÏ´Â ¸ðµç ÆÄÀϸíÀ» °Ë»öÇؼ­ List CollectionÀ¸·Î ¸®ÅÏÇÑ´Ù.

Parameters:
dir -
Returns:
List of File

getListOfFiles

public static List<File> getListOfFiles(File dir,
                                        boolean isSub)
Parameters:
dir -
isSub - - true ÇÏÀ§µð·ºÅ丮ÀÇ ÆÄÀÏ ¸®½ºÆ® Æ÷ÇÔ, false ÇöÀç µð·ºÅ丮ÀÇ ÆÄÀÏ ¸®½ºÆ®¸¸.
Returns:
List of File

readFile

public static List<String> readFile(File file)
                             throws GlueException
Parameters:
file -
Returns:
Throws:
GlueException

readFile

public static List<String> readFile(File file,
                                    Charset charset)
                             throws GlueException
Parameters:
file -
charset -
Returns:
Throws:
GlueException


Copyright © 2013–2018 POSCO ICT. All rights reserved.