|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsears.file.SubtitleFile
sears.file.SsaFile
public class SsaFile
This class represents a ssa subtitle file. Specialize the SubtitleFile for ssa type subtitles. It represents too an ass subtitle file too.
Field Summary | |
---|---|
static java.lang.String |
DIALOGUE_KEY
|
static java.lang.String |
EVENTS_SECTION_DELIMITER
Identifier key for the events section |
static java.lang.String |
FORMAT_KEY
|
Fields inherited from class sears.file.SubtitleFile |
---|
BASIC_CHARSETS, DEFAULT_CHARSET, file, fileChanged, subtitleList, temporaryFile |
Constructor Summary | |
---|---|
SsaFile()
Constructor SsaFile. |
|
SsaFile(java.io.File file,
java.util.ArrayList<Subtitle> subtitleList)
Constructor SsaFile. |
|
SsaFile(java.io.File file,
java.util.ArrayList<Subtitle> subtitleList,
java.lang.String charset)
|
|
SsaFile(java.lang.String file,
java.util.ArrayList<Subtitle> subtitleList)
Constructor SsaFile. |
Method Summary | |
---|---|
java.lang.String |
extension()
Returns the extension file |
protected java.lang.String[] |
getFieldsKey()
|
protected SubtitleFile |
getNewInstance()
Method getNewInstance. |
protected void |
parse()
Method parse. |
protected void |
setBeginPart(java.lang.String beginPart)
|
protected void |
setEndPart(java.lang.String endPart)
|
protected void |
setFieldsKey(java.lang.String[] fieldsKey)
|
SubtitleFile[] |
split(java.io.File[] destinationFiles,
int subtitleIndex,
int secondPartDelay)
Method split. |
static int |
stringToTime(java.lang.String time)
Method stringToTime. |
static java.lang.String |
timeToString(int milliseconds)
Method timeToString. |
void |
writeToFile(java.io.File fileToWrite)
Method writeToFile. |
void |
writeToTemporaryFile()
Method writeToTemporaryFile. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DIALOGUE_KEY
public static final java.lang.String FORMAT_KEY
public static final java.lang.String EVENTS_SECTION_DELIMITER
Constructor Detail |
---|
public SsaFile()
public SsaFile(java.io.File file, java.util.ArrayList<Subtitle> subtitleList) throws FileConversionException
file
- The (File) to open.subtitleList
- The (ArrayList) List of subtitles.
FileConversionException
public SsaFile(java.lang.String file, java.util.ArrayList<Subtitle> subtitleList) throws FileConversionException
file
- The (String) path to file to open.subtitleList
- The (ArrayList) List of subtitles.
FileConversionException
public SsaFile(java.io.File file, java.util.ArrayList<Subtitle> subtitleList, java.lang.String charset) throws FileConversionException
file
- subtitleList
- charset
-
FileConversionException
Method Detail |
---|
protected SubtitleFile getNewInstance()
SubtitleFile
getNewInstance
in class SubtitleFile
protected void setFieldsKey(java.lang.String[] fieldsKey)
protected java.lang.String[] getFieldsKey()
protected void setBeginPart(java.lang.String beginPart)
protected void setEndPart(java.lang.String endPart)
protected void parse() throws FileConversionException
SubtitleFile
parse
in class SubtitleFile
FileConversionException
- if a limitation when reading the file appearspublic void writeToFile(java.io.File fileToWrite) throws FileConversionException
SubtitleFile
writeToFile
in class SubtitleFile
fileToWrite
- The File to write the file.
FileConversionException
public void writeToTemporaryFile()
SubtitleFile
writeToTemporaryFile
in class SubtitleFile
public static int stringToTime(java.lang.String time) throws java.lang.NumberFormatException
time
- The string ssa time representation.
java.lang.NumberFormatException
public static java.lang.String timeToString(int milliseconds)
milliseconds
- The number of milliseconds to transform
public java.lang.String extension()
SubtitleFile
extension
in class SubtitleFile
public SubtitleFile[] split(java.io.File[] destinationFiles, int subtitleIndex, int secondPartDelay)
SubtitleFile
split
in class SubtitleFile
destinationFiles
- The File[] where to save the two parts of the file.subtitleIndex
- The int subtitle index, from wich create the second part of the subtitle.secondPartDelay
- The int initial delay to apply to the second part.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |