org.codehaus.mojo.delicious
Class Util

java.lang.Object
  extended by org.codehaus.mojo.delicious.Util

public class Util
extends Object

Various utility methods that glue the classes together.

Author:
ashley

Constructor Summary
Util()
           
 
Method Summary
static Reader getFileReader(String fileName)
          Deprecated. call getReader with a file:// url
static Reader getReader(String url)
          Obtains a reader for the given URL.
static Reader getResourceReader(String path)
          Gets a reader for a resource on the classpath.
static void logStream(Logger logger, Priority priority, Reader reader)
          Logs the message contained in the given reader.
 
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

getReader

public static Reader getReader(String url)
                        throws IOException
Obtains a reader for the given URL. The returned reader should be closed.

Parameters:
url -
Returns:
Throws:
IOException

getFileReader

public static Reader getFileReader(String fileName)
                            throws FileNotFoundException
Deprecated. call getReader with a file:// url

Obtains a reader for the given already existing file. The returned reader should be closed.

Parameters:
fileName -
Returns:
Throws:
FileNotFoundException

getResourceReader

public static Reader getResourceReader(String path)
Gets a reader for a resource on the classpath.

Parameters:
path -
Returns:

logStream

public static void logStream(Logger logger,
                             Priority priority,
                             Reader reader)
                      throws IOException
Logs the message contained in the given reader.

Parameters:
logger -
priority -
reader -
Throws:
IOException


Copyright © 2005-2011 Codehaus. All Rights Reserved.