org.codehaus.mojo.delicious
Class Util

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

public class Util
extends java.lang.Object

Various utility methods that glue the classes together.

Author:
ashley

Constructor Summary
Util()
           
 
Method Summary
static java.io.Reader getFileReader(java.lang.String fileName)
          Deprecated. call getReader with a file:// url
static java.io.Reader getReader(java.lang.String url)
          Obtains a reader for the given URL.
static java.io.Reader getResourceReader(java.lang.String path)
          Gets a reader for a resource on the classpath.
static void logStream(org.apache.log4j.Logger logger, org.apache.log4j.Priority priority, java.io.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 java.io.Reader getReader(java.lang.String url)
                                throws java.io.IOException
Obtains a reader for the given URL. The returned reader should be closed.

Parameters:
url -
Returns:
Throws:
java.io.IOException

getFileReader

public static java.io.Reader getFileReader(java.lang.String fileName)
                                    throws java.io.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:
java.io.FileNotFoundException

getResourceReader

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

Parameters:
path -
Returns:

logStream

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

Parameters:
logger -
priority -
reader -
Throws:
java.io.IOException


Copyright © 2005-2009. All Rights Reserved.