org.gcube.portlets.user.homelibrary.util
Class Util

java.lang.Object
  extended by org.gcube.portlets.user.homelibrary.util.Util

public class Util
extends Object

Author:
Federico De Faveri defaveri@isti.cnr.it

Field Summary
protected static File tmpGlobs
           
protected static File tmpMagic
           
 
Constructor Summary
Util()
           
 
Method Summary
static void cleanDir(File dir)
          Clean and delete the specified dir.
static String readStreamAsString(InputStream is)
          Read the entire input stream as string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tmpMagic

protected static File tmpMagic

tmpGlobs

protected static File tmpGlobs
Constructor Detail

Util

public Util()
Method Detail

cleanDir

public static void cleanDir(File dir)
Clean and delete the specified dir.

Parameters:
dir - the target dir.

readStreamAsString

public static String readStreamAsString(InputStream is)
                                 throws IOException
Read the entire input stream as string. The system encoding is used.

Parameters:
is - the input stream.
Returns:
the read string.
Throws:
IOException - if an error occurs.


Copyright © 2013. All Rights Reserved.