com.alibaba.druid.util
Class IOUtils

java.lang.Object
  extended by com.alibaba.druid.util.IOUtils

public class IOUtils
extends Object


Field Summary
static int DEFAULT_BUFFER_SIZE
           
 
Constructor Summary
IOUtils()
           
 
Method Summary
static long copy(InputStream input, OutputStream output)
           
static String getStackTrace(Throwable ex)
           
static String read(InputStream in)
           
static String read(Reader reader)
           
static String read(Reader reader, int length)
           
static byte[] readByteArray(InputStream input)
           
static byte[] readByteArrayFromResource(String resource)
           
static String readFromResource(String resource)
           
static String toString(Date date)
           
static String toString(StackTraceElement[] stackTrace)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_BUFFER_SIZE

public static final int DEFAULT_BUFFER_SIZE
See Also:
Constant Field Values
Constructor Detail

IOUtils

public IOUtils()
Method Detail

read

public static String read(InputStream in)

readFromResource

public static String readFromResource(String resource)
                               throws IOException
Throws:
IOException

readByteArrayFromResource

public static byte[] readByteArrayFromResource(String resource)
                                        throws IOException
Throws:
IOException

readByteArray

public static byte[] readByteArray(InputStream input)
                            throws IOException
Throws:
IOException

copy

public static long copy(InputStream input,
                        OutputStream output)
                 throws IOException
Throws:
IOException

read

public static String read(Reader reader)

read

public static String read(Reader reader,
                          int length)

toString

public static String toString(Date date)

getStackTrace

public static String getStackTrace(Throwable ex)

toString

public static String toString(StackTraceElement[] stackTrace)


Copyright © 2012 Alibaba Group. All Rights Reserved.