com.bradmcevoy.io
Class StreamUtils
java.lang.Object
com.bradmcevoy.io.StreamUtils
public class StreamUtils
- extends java.lang.Object
|
Method Summary |
static void |
close(java.io.InputStream in)
|
static void |
close(java.io.OutputStream out)
|
static long |
readTo(java.io.File inFile,
java.io.OutputStream out,
boolean closeOut)
|
static long |
readTo(java.io.InputStream in,
java.io.File outFile,
boolean closeIn)
|
static long |
readTo(java.io.InputStream in,
java.io.OutputStream out)
Copies data from in to out and DOES NOT close streams |
static long |
readTo(java.io.InputStream in,
java.io.OutputStream out,
boolean closeIn,
boolean closeOut)
Reads bytes from the input and writes them, completely, to the output. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
readTo
public static long readTo(java.io.File inFile,
java.io.OutputStream out,
boolean closeOut)
throws ReadingException,
WritingException
- Throws:
ReadingException
WritingException
readTo
public static long readTo(java.io.InputStream in,
java.io.File outFile,
boolean closeIn)
throws ReadingException,
WritingException
- Throws:
ReadingException
WritingException
readTo
public static long readTo(java.io.InputStream in,
java.io.OutputStream out)
throws ReadingException,
WritingException
- Copies data from in to out and DOES NOT close streams
- Parameters:
in - out -
- Returns:
-
- Throws:
ReadingException
WritingException
readTo
public static long readTo(java.io.InputStream in,
java.io.OutputStream out,
boolean closeIn,
boolean closeOut)
throws ReadingException,
WritingException
- Reads bytes from the input and writes them, completely, to the output. Closes both streams when
finished depending on closeIn and closeOyt
- Parameters:
in - out - closeIn - closeOut -
- Returns:
- - number of bytes written
- Throws:
ReadingException
WritingException
close
public static void close(java.io.OutputStream out)
close
public static void close(java.io.InputStream in)
Copyright © 2011. All Rights Reserved.