|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Throwable
java.lang.Exception
java.io.IOException
sears.file.exception.io.FileConversionException
public abstract class FileConversionException
A FileConversionException is throw when an error occurs during a file access
and conversion to subtitle file
This class provides static methods to create generic objects using
the class constants.
Two distinct categories of constants:
- file access exception ( read and write access )
- malformed subtitle file exception
Field Summary | |
---|---|
static int |
EMPTY_SUBTITLE_FILE
MALFORMED SUBTITLE FILE EXCEPTION: empty subtitle file exception |
static int |
MALFORMED_END_TIME
MALFORMED SUBTITLE FILE EXCEPTION: malformed subtitle end time exception |
static int |
MALFORMED_START_TIME
MALFORMED SUBTITLE FILE EXCEPTION: malformed subtitle start time exception |
static int |
MALFORMED_SUBTITLE_FILE
MALFORMED SUBTITLE FILE EXCEPTION: generic subtitle file exception |
static int |
MALFORMED_SUBTITLE_NUMBER
MALFORMED SUBTITLE FILE EXCEPTION: malformed subtitle number exception |
static int |
MALFORMED_SUBTITLE_TEXT
MALFORMED SUBTITLE FILE EXCEPTION: malformed subtitle text exception |
static int |
MALFORMED_TIME_LINE
MALFORMED SUBTITLE FILE EXCEPTION: malformed subtitle time line exception |
static int |
NO_SUBTITLE_NUMBER
MALFORMED SUBTITLE FILE EXCEPTION: no subtitle number exception |
static int |
NO_SUBTITLE_TEXT
MALFORMED SUBTITLE FILE EXCEPTION: no subtitle text exception |
static int |
NO_SUBTITLE_TIME
MALFORMED SUBTITLE FILE EXCEPTION: no subtitle time exception |
static int |
READ_ACCESS
FILE ACCESS EXCEPTION: Read access exception |
static int |
UNEXPECTED_END_OF_FILE
MALFORMED SUBTITLE FILE EXCEPTION: unexpected end of file exception |
static int |
UNSUPPORTED_FILE_SIZE
FILE ACCESS EXCEPTION: unsupported file size exception |
static int |
WRITE_ACCESS
FILE ACCESS EXCEPTION: Write access exception |
Constructor Summary | |
---|---|
FileConversionException()
|
Method Summary | |
---|---|
abstract boolean |
couldBeABadEncoding()
Returns a boolean which indicates if the error could have appeared because of a bad encoding/decoding |
static FileConversionException |
getAccessException(int type,
java.io.File file)
Get a new FileConversionException instance |
abstract java.lang.String |
getDetail()
Returns the detail error message |
static FileConversionException |
getMalformedSubtitleFileException(int type,
java.io.File file)
Get a new FileConversionException instance |
static FileConversionException |
getMalformedSubtitleFileException(int type,
java.io.File file,
int lineNumber,
java.lang.String line)
Get a new FileConversionException instance |
abstract java.lang.String |
getMessage()
Returns the error message |
static FileConversionException |
getUnsupportedFileFormatException(java.io.File file,
java.lang.String extension)
Get a new FileConversionException instance |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int READ_ACCESS
public static final int WRITE_ACCESS
public static final int UNSUPPORTED_FILE_SIZE
public static final int NO_SUBTITLE_NUMBER
public static final int MALFORMED_SUBTITLE_NUMBER
public static final int NO_SUBTITLE_TIME
public static final int MALFORMED_TIME_LINE
public static final int MALFORMED_START_TIME
public static final int MALFORMED_END_TIME
public static final int NO_SUBTITLE_TEXT
public static final int MALFORMED_SUBTITLE_TEXT
public static final int MALFORMED_SUBTITLE_FILE
public static final int UNEXPECTED_END_OF_FILE
public static final int EMPTY_SUBTITLE_FILE
Constructor Detail |
---|
public FileConversionException()
Method Detail |
---|
public abstract java.lang.String getMessage()
getMessage
in class java.lang.Throwable
public abstract java.lang.String getDetail()
public abstract boolean couldBeABadEncoding()
public static FileConversionException getAccessException(int type, java.io.File file)
type
- READ_ACCESS, WRITE_ACCESS, UNSUPPORTED_FILE_SIZEfile
- the file where the error is encountered
public static FileConversionException getMalformedSubtitleFileException(int type, java.io.File file)
type
- UNEXPECTED_END_OF_FILE, EMPTY_SUBTITLE_FILEfile
- the file on which the error occurs
public static FileConversionException getMalformedSubtitleFileException(int type, java.io.File file, int lineNumber, java.lang.String line)
type
- MALFORMED_SUBTITLE_NUMBER file
- the file on which the error occurrslineNumber
- the line number where the error is encounteredline
- the line where the error is encountered
public static FileConversionException getUnsupportedFileFormatException(java.io.File file, java.lang.String extension)
file
- the file in causeextension
- the file extension
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |