com.badlogic.gdx.utils
Class StreamUtils

java.lang.Object
  extended by com.badlogic.gdx.utils.StreamUtils

public class StreamUtils
extends Object

Provides utility methods to copy streams


Field Summary
static byte[] EMPTY_BYTES
           
 
Constructor Summary
StreamUtils()
           
 
Method Summary
static void closeQuietly(Closeable c)
          Close and ignore all errors.
static void copyStream(InputStream input, OutputStream output)
          Copy the data from an InputStream to an OutputStream.
static void copyStream(InputStream input, OutputStream output, int bufferSize)
          Copy the data from an InputStream to an OutputStream.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY_BYTES

public static final byte[] EMPTY_BYTES
Constructor Detail

StreamUtils

public StreamUtils()
Method Detail

copyStream

public static void copyStream(InputStream input,
                              OutputStream output)
                       throws IOException
Copy the data from an InputStream to an OutputStream.

Throws:
IOException

copyStream

public static void copyStream(InputStream input,
                              OutputStream output,
                              int bufferSize)
                       throws IOException
Copy the data from an InputStream to an OutputStream.

Throws:
IOException

closeQuietly

public static void closeQuietly(Closeable c)
Close and ignore all errors.



Copyright © 2013. All Rights Reserved.