public final class UtilStream extends Object
This class is Thread-Safe.
Modifier and Type | Method and Description |
---|---|
static void |
close(Closeable closeable)
Close and log exception if unable to close.
|
static void |
copy(InputStream source,
OutputStream destination)
Copy a stream onto another.
|
static File |
getCopy(String name,
InputStream input)
Get of full copy of the input stream stored in a temporary file.
|
static void |
safeClose(Closeable closeable)
Close and log exception if unable to close.
|
public static void copy(InputStream source, OutputStream destination) throws IOException
source
- The source stream.destination
- The destination stream.IOException
- If error.LionEngineException
- If null
arguments.public static void safeClose(Closeable closeable)
closeable
- The closeable to close.public static void close(Closeable closeable) throws IOException
closeable
- The closeable to close.IOException
- If unable to close.public static File getCopy(String name, InputStream input)
name
- The file name reference (to have a similar temporary file name).input
- The input stream reference.LionEngineException
- If null
arguments or invalid stream.Copyright © 2017 Byron 3D Games Studio. All rights reserved.