org.apache.maven.doxia.wrapper
Class InputFileWrapper
java.lang.Object
org.apache.maven.doxia.wrapper.InputFileWrapper
- All Implemented Interfaces:
- Serializable
public class InputFileWrapper
- extends Object
Wrapper for an input file.
- Version:
- $Id: InputFileWrapper.java 697523 2008-09-21 14:29:09Z vsiveton $
- Author:
- Vincent Siveton
- See Also:
- Serialized Form
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
valueOf
public static InputFileWrapper valueOf(String absolutePath,
String format,
String[] supportedFormat)
throws IllegalArgumentException,
UnsupportedEncodingException,
FileNotFoundException
- Parameters:
absolutePath - for a file or a directory not null.format - could be nullcharsetName - could be nullsupportedFormat - not null
- Returns:
- a type safe input reader
- Throws:
IllegalArgumentException - if the file doesn't exist.
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 IllegalArgumentException,
UnsupportedEncodingException,
FileNotFoundException
- Parameters:
absolutePath - for a wanted file or a wanted directory, not null.format - could be nullcharsetName - could be nullsupportedFormat - not null
- Returns:
- a type safe input reader
- Throws:
IllegalArgumentException - if the file doesn't exist.
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-2009 The Apache Software Foundation. All Rights Reserved.