com.alibaba.rocketmq.common.utils
类 IOTinyUtils

java.lang.Object
  继承者 com.alibaba.rocketmq.common.utils.IOTinyUtils

public class IOTinyUtils
extends Object

IO操作

作者:
manhong.yqd

构造方法摘要
IOTinyUtils()
           
 
方法摘要
static void cleanDirectory(File directory)
          清理目录下的内容
static long copy(Reader input, Writer output)
           
static void copyFile(String source, String target)
           
static void delete(File fileOrDir)
           
static List<String> readLines(Reader input)
          从输入流读行列表。
static String toString(InputStream input, String encoding)
           
static String toString(Reader reader)
           
static void writeStringToFile(File file, String data, String encoding)
           
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

IOTinyUtils

public IOTinyUtils()
方法详细信息

toString

public static String toString(InputStream input,
                              String encoding)
                       throws IOException
抛出:
IOException

toString

public static String toString(Reader reader)
                       throws IOException
抛出:
IOException

copy

public static long copy(Reader input,
                        Writer output)
                 throws IOException
抛出:
IOException

readLines

public static List<String> readLines(Reader input)
                              throws IOException
从输入流读行列表。保证不返回NULL。

抛出:
IOException

copyFile

public static void copyFile(String source,
                            String target)
                     throws IOException
抛出:
IOException

delete

public static void delete(File fileOrDir)
                   throws IOException
抛出:
IOException

cleanDirectory

public static void cleanDirectory(File directory)
                           throws IOException
清理目录下的内容

抛出:
IOException

writeStringToFile

public static void writeStringToFile(File file,
                                     String data,
                                     String encoding)
                              throws IOException
抛出:
IOException


Copyright © 2012-2015. All Rights Reserved.