Package de.willuhn.io

Class IOUtil


  • public class IOUtil
    extends java.lang.Object
    Util-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 boolean close​(java.io.Closeable... closeables)
      Schliesst Streams.
      static long copy​(java.io.InputStream is, java.io.OutputStream os)
      Kopiert die Daten vom InputStream in den OutputStream.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • IOUtil

        public IOUtil()
    • Method Detail

      • copy

        public static long copy​(java.io.InputStream is,
                                java.io.OutputStream os)
                         throws java.io.IOException
        Kopiert 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.