org.apache.hadoop.hdfs.server.common
Class Util

java.lang.Object
  extended by org.apache.hadoop.hdfs.server.common.Util

@InterfaceAudience.Private
public final class Util
extends Object


Constructor Summary
Util()
           
 
Method Summary
static URI fileAsURI(File f)
          Converts the passed File to a URI.
static long now()
          Current system time.
static URI stringAsURI(String s)
          Interprets the passed string as a URI.
static Collection<URI> stringCollectionAsURIs(Collection<String> names)
          Converts a collection of strings into a collection of URIs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Util

public Util()
Method Detail

now

public static long now()
Current system time.

Returns:
current time in msec.

stringAsURI

public static URI stringAsURI(String s)
                       throws IOException
Interprets the passed string as a URI. In case of error it assumes the specified string is a file.

Parameters:
s - the string to interpret
Returns:
the resulting URI
Throws:
IOException

fileAsURI

public static URI fileAsURI(File f)
                     throws IOException
Converts the passed File to a URI.

Parameters:
f - the file to convert
Returns:
the resulting URI
Throws:
IOException

stringCollectionAsURIs

public static Collection<URI> stringCollectionAsURIs(Collection<String> names)
Converts a collection of strings into a collection of URIs.

Parameters:
names - collection of strings to convert to URIs
Returns:
collection of URIs


Copyright © 2009 The Apache Software Foundation