|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthudson.plugins.analysis.util.EncodingValidator
public class EncodingValidator
Validates a file encoding. The encoding must be an encoding ID supported by the underlying Java platform.
| Constructor Summary | |
|---|---|
EncodingValidator()
|
|
| Method Summary | |
|---|---|
hudson.util.FormValidation |
check(String encoding)
Validates a file encoding. |
static Charset |
defaultCharset(String defaultEncoding)
Returns the default charset for the specified encoding string. |
static Set<String> |
getAvailableCharsets()
Returns all available character set names. |
static org.apache.commons.io.LineIterator |
readFile(String fileName,
String encoding)
Reads the specified file with the given encoding. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EncodingValidator()
| Method Detail |
|---|
public static Set<String> getAvailableCharsets()
public static Charset defaultCharset(String defaultEncoding)
null, or if the charset is not
valid then the default encoding of the platform is returned.
defaultEncoding - identifier of the character set
public static org.apache.commons.io.LineIterator readFile(String fileName,
String encoding)
throws FileNotFoundException,
IOException
fileName - the file nameencoding - the encoding of the file, if null or empty then
the default encoding of the platform is used
FileNotFoundException - Indicates that the file is not found.
IOException - Signals that an I/O exception has occurred during reading of
the file.
public hudson.util.FormValidation check(String encoding)
throws hudson.util.FormValidation
check in interface Validatorencoding - the name of the encoding that will be checked
FormValidation object
hudson.util.FormValidation - if the encoding is not valid
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||