org.mentawai.util
Class IOUtils

java.lang.Object
  extended by org.mentawai.util.IOUtils

public class IOUtils
extends Object


Constructor Summary
IOUtils()
           
 
Method Summary
static void createDir(String dirName)
           
static byte[] readBytesFromURL(String url)
           
static String readFile(String file)
           
static String readFile(String file, String charset)
           
static String readURL(String url)
           
static String readURL(String url, Map<String,Object> params)
           
static String readURL(String url, Map<String,Object> params, String charset)
           
static String readURL(String url, String charset)
           
static void writeFile(URL fromURL, File toFile)
           
static void writeFile(URL fromURL, String toFile)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IOUtils

public IOUtils()
Method Detail

writeFile

public static void writeFile(URL fromURL,
                             File toFile)
                      throws IOException
Throws:
IOException

writeFile

public static void writeFile(URL fromURL,
                             String toFile)
                      throws IOException
Throws:
IOException

readFile

public static String readFile(String file)
                       throws IOException
Throws:
IOException

readFile

public static String readFile(String file,
                              String charset)
                       throws IOException
Throws:
IOException

createDir

public static void createDir(String dirName)
                      throws IOException
Throws:
IOException

readURL

public static String readURL(String url,
                             Map<String,Object> params)
                      throws Throwable
Throws:
Throwable

readURL

public static String readURL(String url,
                             Map<String,Object> params,
                             String charset)
                      throws Throwable
Throws:
Throwable

readURL

public static String readURL(String url)
                      throws Throwable
Throws:
Throwable

readURL

public static String readURL(String url,
                             String charset)
                      throws Throwable
Throws:
Throwable

readBytesFromURL

public static byte[] readBytesFromURL(String url)
                               throws Throwable
Throws:
Throwable


Copyright © 2013. All Rights Reserved.