org.apache.maven.doxia.wrapper
Class InputFileWrapper

java.lang.Object
  extended by org.apache.maven.doxia.wrapper.InputFileWrapper
All Implemented Interfaces:
Serializable

public class InputFileWrapper
extends Object

Wrapper for an input file.

Version:
$Id$
Author:
Vincent Siveton
See Also:
Serialized Form

Field Summary
static String AUTO_ENCODING
           
static String AUTO_FORMAT
           
 
Method Summary
 boolean equals(Object other)
          
 String getEncoding()
           
 File getFile()
           
 String getFormat()
           
 String[] getSupportedFormat()
           
 int hashCode()
          
 String toString()
          
static InputFileWrapper valueOf(String absolutePath, String format, String[] supportedFormat)
           
static InputFileWrapper valueOf(String absolutePath, String format, String charsetName, String[] supportedFormat)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

AUTO_ENCODING

public static final String AUTO_ENCODING
See Also:
Constant Field Values

AUTO_FORMAT

public static final String AUTO_FORMAT
See Also:
Constant Field Values
Method Detail

valueOf

public static InputFileWrapper valueOf(String absolutePath,
                                       String format,
                                       String[] supportedFormat)
                                throws UnsupportedEncodingException,
                                       FileNotFoundException
Parameters:
absolutePath - for a file or a directory not null.
format - could be null
supportedFormat - not null
Returns:
a type safe input reader
Throws:
UnsupportedEncodingException - if the encoding is unsupported.
FileNotFoundException - if the file for absolutePath is not found.
See Also:
using AUTO_FORMAT

valueOf

public static InputFileWrapper valueOf(String absolutePath,
                                       String format,
                                       String charsetName,
                                       String[] supportedFormat)
                                throws UnsupportedEncodingException,
                                       FileNotFoundException
Parameters:
absolutePath - for a wanted file or a wanted directory, not null.
format - could be null
charsetName - could be null
supportedFormat - not null
Returns:
a type safe input reader
Throws:
UnsupportedEncodingException - if the encoding is unsupported.
FileNotFoundException - if the file for absolutePath is not found.

getFile

public File getFile()
Returns:
the file

getEncoding

public String getEncoding()
Returns:
the encoding used for the file or null if not specified.

equals

public boolean equals(Object other)


hashCode

public int hashCode()


toString

public String toString()


getFormat

public String getFormat()
Returns:
the wanted format.

getSupportedFormat

public String[] getSupportedFormat()
Returns:
the supportedFormat


Copyright © 2005-2010 FuseSource. All Rights Reserved.