com.mchange.v1.io
Class InputStreamUtils

java.lang.Object
  extended by com.mchange.v1.io.InputStreamUtils

public final class InputStreamUtils
extends java.lang.Object


Method Summary
static void attemptClose(java.io.InputStream is)
           
static boolean compare(java.io.InputStream is1, java.io.InputStream is2)
           
static boolean compare(java.io.InputStream is1, java.io.InputStream is2, long num_bytes)
           
static byte[] getBytes(java.io.InputStream is)
           
static byte[] getBytes(java.io.InputStream is, int max_len)
           
static java.lang.String getContentsAsString(java.io.InputStream is)
           
static java.lang.String getContentsAsString(java.io.InputStream is, int max_len)
           
static java.lang.String getContentsAsString(java.io.InputStream is, int max_len, java.lang.String enc)
           
static java.lang.String getContentsAsString(java.io.InputStream is, java.lang.String enc)
           
static java.io.InputStream getEmptyInputStream()
           
static void skipFully(java.io.InputStream is, long num_bytes)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

compare

public static boolean compare(java.io.InputStream is1,
                              java.io.InputStream is2,
                              long num_bytes)
                       throws java.io.IOException
Throws:
java.io.IOException

compare

public static boolean compare(java.io.InputStream is1,
                              java.io.InputStream is2)
                       throws java.io.IOException
Throws:
java.io.IOException

getBytes

public static byte[] getBytes(java.io.InputStream is,
                              int max_len)
                       throws java.io.IOException
Throws:
java.io.IOException

getBytes

public static byte[] getBytes(java.io.InputStream is)
                       throws java.io.IOException
Throws:
java.io.IOException

getContentsAsString

public static java.lang.String getContentsAsString(java.io.InputStream is,
                                                   java.lang.String enc)
                                            throws java.io.IOException,
                                                   java.io.UnsupportedEncodingException
Throws:
java.io.IOException
java.io.UnsupportedEncodingException

getContentsAsString

public static java.lang.String getContentsAsString(java.io.InputStream is)
                                            throws java.io.IOException
Throws:
java.io.IOException

getContentsAsString

public static java.lang.String getContentsAsString(java.io.InputStream is,
                                                   int max_len,
                                                   java.lang.String enc)
                                            throws java.io.IOException,
                                                   java.io.UnsupportedEncodingException
Throws:
java.io.IOException
java.io.UnsupportedEncodingException

getContentsAsString

public static java.lang.String getContentsAsString(java.io.InputStream is,
                                                   int max_len)
                                            throws java.io.IOException
Throws:
java.io.IOException

getEmptyInputStream

public static java.io.InputStream getEmptyInputStream()

attemptClose

public static void attemptClose(java.io.InputStream is)

skipFully

public static void skipFully(java.io.InputStream is,
                             long num_bytes)
                      throws java.io.EOFException,
                             java.io.IOException
Throws:
java.io.EOFException
java.io.IOException