Package de.willuhn.io
Class IOUtil
- java.lang.Object
-
- de.willuhn.io.IOUtil
-
public class IOUtil extends java.lang.ObjectUtil-Klasse mit Hilfsfunktionen fuer Streams.
-
-
Constructor Summary
Constructors Constructor Description IOUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanclose(java.io.Closeable... closeables)Schliesst Streams.static longcopy(java.io.InputStream is, java.io.OutputStream os)Kopiert die Daten vom InputStream in den OutputStream.
-
-
-
Method Detail
-
copy
public static long copy(java.io.InputStream is, java.io.OutputStream os) throws java.io.IOExceptionKopiert die Daten vom InputStream in den OutputStream.- Parameters:
is- Quell-Stream.os- Ziel-Stream.- Returns:
- Anzahl der kopierten Bytes.
- Throws:
java.io.IOException
-
close
public static boolean close(java.io.Closeable... closeables)
Schliesst Streams. Ggf. auftretende Exceptions werden nicht weitergeworfen sondern nur geloggt.- Parameters:
closeables- Liste zu schliessender Streams. NULL wird toleriert.- Returns:
- true, wenn das Schliessen erfolgreich war, sonst false.
-
-