com.b3dgs.lionengine.file.impl
Class FileFactory

java.lang.Object
  extended by com.b3dgs.lionengine.file.impl.FileFactory
All Implemented Interfaces:
File

public final class FileFactory
extends java.lang.Object
implements File


Field Summary
 
Fields inherited from interface com.b3dgs.lionengine.File
FILE
 
Method Summary
 FileReader createFileReader(java.lang.String path)
          Open a file as read only.
 FileWriter createFileWriter(java.lang.String path)
          Open a file as write only.
 XMLNode createXMLNode(java.lang.String name)
          Create an xml node from a name.
 XMLParser createXMLParser()
          Create an XML parser, in order to load an xml node from a file.
static FileFactory getInstance()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static FileFactory getInstance()
Returns:
singleton.

createFileReader

public FileReader createFileReader(java.lang.String path)
                            throws java.io.FileNotFoundException
Description copied from interface: File
Open a file as read only.

Specified by:
createFileReader in interface File
Parameters:
path - file name.
Returns:
created FileReader.
Throws:
java.io.FileNotFoundException - if file is not found.

createFileWriter

public FileWriter createFileWriter(java.lang.String path)
                            throws java.io.FileNotFoundException
Description copied from interface: File
Open a file as write only.

Specified by:
createFileWriter in interface File
Parameters:
path - file name.
Returns:
created FileWriter.
Throws:
java.io.FileNotFoundException - if file is not found.

createXMLParser

public XMLParser createXMLParser()
Description copied from interface: File
Create an XML parser, in order to load an xml node from a file.

Specified by:
createXMLParser in interface File
Returns:
parser reference.

createXMLNode

public XMLNode createXMLNode(java.lang.String name)
Description copied from interface: File
Create an xml node from a name.

Specified by:
createXMLNode in interface File
Parameters:
name - node name.
Returns:
node reference.