org.semanticweb.elk.io
Class IOUtils

java.lang.Object
  extended by org.semanticweb.elk.io.IOUtils

public class IOUtils
extends Object

Author:
Pavel Klinov pavel.klinov@uni-ulm.de

Constructor Summary
IOUtils()
           
 
Method Summary
static void closeQuietly(InputStream stream)
           
static void closeQuietly(OutputStream stream)
           
static int copy(InputStream input, OutputStream output)
          Copies bytes from the input stream to the output stream
static List<String> getResourceNamesFromDir(File dir, String extension)
           
static List<String> getResourceNamesFromJAR(String path, String extension, Class<?> clazz)
          Retrieves a set of resource names from a JAR file (the code source for the given Java class)
static int readInteger(URL src, int radix)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IOUtils

public IOUtils()
Method Detail

closeQuietly

public static void closeQuietly(InputStream stream)

closeQuietly

public static void closeQuietly(OutputStream stream)

copy

public static int copy(InputStream input,
                       OutputStream output)
                throws IOException
Copies bytes from the input stream to the output stream

Parameters:
input -
output -
Returns:
The number of bytes copied
Throws:
IOException

getResourceNamesFromDir

public static List<String> getResourceNamesFromDir(File dir,
                                                   String extension)

getResourceNamesFromJAR

public static List<String> getResourceNamesFromJAR(String path,
                                                   String extension,
                                                   Class<?> clazz)
                                            throws IOException
Retrieves a set of resource names from a JAR file (the code source for the given Java class)

Parameters:
path -
extension -
clazz -
Returns:
the list of resource names from a JAR file
Throws:
IOException

readInteger

public static int readInteger(URL src,
                              int radix)
                       throws IOException
Throws:
IOException


Copyright © 2011-2013 Department of Computer Science, University of Oxford. All Rights Reserved.