|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.univocity.api.io.FileProvider
public final class FileProvider
A FileProvider validates and stores the minimum information required by uniVocity to locate and manipulate files.
System properties can be used as part of the file name, such as {user.home}.
| Constructor Summary | |
|---|---|
FileProvider(File file)
Creates a provider for the file to be read/written using the default system encoding. |
|
FileProvider(File file,
Charset encoding)
Creates a provider for the file to be read/written using a given encoding |
|
FileProvider(File file,
String encoding)
Creates a provider for the file to be read/written using a given encoding |
|
FileProvider(String file)
Creates a provider for the file, represented by a path, to be read/written using the default system encoding. |
|
FileProvider(String filePath,
Charset encoding)
Creates a provider for the file, represented by a path, to be read/written using the default system encoding. |
|
FileProvider(String file,
String encoding)
Creates a provider for the file, represented by a path, to be read/written using the default system encoding. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object o)
|
Charset |
getEncoding()
Returns the encoding used to manipulate the provided file. |
File |
getFile()
Returns the File instance given in the constructor of this class, or null if a path to a resource is being used. |
String |
getFilePath()
Returns the resource path given in the constructor of this class, or null if a File is being used. |
int |
hashCode()
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FileProvider(File file)
file - the File
public FileProvider(File file,
String encoding)
file - the File to be used.encoding - the name of the encoding that must be used to read from/write to the given file.
public FileProvider(File file,
Charset encoding)
file - the File to be used.encoding - the encoding that must be used to read from/write to the given file.public FileProvider(String file)
{user.home}/myapp/log").
file - the path to a file. It can either be the path to a file in the file system or a resource in the classpath.
public FileProvider(String file,
String encoding)
{user.home}/myapp/log").
file - the path to a file. It can either be the path to a file in the file system or a resource in the classpath.encoding - the name of the encoding that must be used to read from/write to the given file.
public FileProvider(String filePath,
Charset encoding)
{user.home}/myapp/log").
filePath - the path to a file. It can either be the path to a file in the file system or a resource in the classpath.encoding - the encoding that must be used to read from/write to the given file.| Method Detail |
|---|
public final File getFile()
null if a path to a resource is being used.
public final Charset getEncoding()
public final String getFilePath()
File is being used.
File should be used instead.public final String toString()
toString in class Objectpublic boolean equals(Object o)
equals in class Objectpublic int hashCode()
hashCode in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||