|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsears.file.FileSystemAccess
public class FileSystemAccess
Provides access method to file like open and save
An instance of this class captures error coming from the conversion of file to subtitle file
Field Summary | |
---|---|
static int |
MAX_SUBTITLE_FILE_SIZE
(int) maximum authorized size for a subtitle file, 2 Mo |
Constructor Summary | |
---|---|
protected |
FileSystemAccess(MainWindow mainWindow)
Default constructor |
Method Summary | |
---|---|
static FileSystemAccess |
getInstance()
Gives the same instance of this class Only used by MainWindow class |
SubtitleFile |
openFile(java.io.File file,
java.util.ArrayList<Subtitle> subtitleList,
java.lang.String charset)
Provides a way to get SubtitleFile instance from a file If an error occurs an error dialog is called |
SubtitleFile |
openFile(java.io.File file,
java.lang.String charset)
Provides a way to get a SubtitleFile instance from a file |
boolean |
saveFile(java.io.File file,
SubtitleFile subtitleFile,
java.lang.String charset)
Writes the subtitle to a file and invokes an error dialog if an error occurs during the action |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int MAX_SUBTITLE_FILE_SIZE
Constructor Detail |
---|
protected FileSystemAccess(MainWindow mainWindow)
mainWindow
- the extended controllerMethod Detail |
---|
public static FileSystemAccess getInstance()
public SubtitleFile openFile(java.io.File file, java.lang.String charset)
file
- the file to convertcharset
- the charset used for the conversion
public SubtitleFile openFile(java.io.File file, java.util.ArrayList<Subtitle> subtitleList, java.lang.String charset)
file
- the file to convertsubtitleList
- the subtitle list to fillcharset
- the charset used for the conversion
public boolean saveFile(java.io.File file, SubtitleFile subtitleFile, java.lang.String charset)
file
- the file in which the subtitle must be writesubtitleFile
- the subtitle to writecharset
- the charset used to write the file, if null the subtitle's charset will be used
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |