|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--de.hunsicker.io.FileFormat
Represents the file format of a platform. The file format is defined by the line separator the platform uses.
Field Summary | |
static FileFormat |
AUTO
Indicates that the file format should be auto-detected. |
static FileFormat |
DEFAULT
Represents the platform default file format. |
static FileFormat |
DOS
Represents the DOS file format ("\r\n"). |
static FileFormat |
MAC
Represents the Mac file format ("\r"). |
static FileFormat |
UNIX
Represents the Unix file format ("\n"). |
static FileFormat |
UNKNOWN
Represents an unknown or not yet determined file format. |
Method Summary | |
java.lang.String |
getLineSeparator()
Returns the characteristic line separator of the file format. |
java.lang.String |
getName()
Returns the descriptive name of the file format. |
java.lang.String |
toString()
Returns a string representation of this object. |
static FileFormat |
valueOf(java.lang.String format)
Returns the FileFormat object for the given file format string. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final FileFormat DEFAULT
public static final FileFormat AUTO
public static final FileFormat DOS
public static final FileFormat MAC
public static final FileFormat UNIX
public static final FileFormat UNKNOWN
Method Detail |
public java.lang.String getLineSeparator()
UNKNOWN
and AUTO
does not have distinct line separators and
therefore rather return the platform default separator.
public java.lang.String getName()
public static FileFormat valueOf(java.lang.String format)
format
- a valid format string. Either "\r\n" or "DOS",
"\n" or "UNIX", "\r" or "MAC",
"auto" or "default" (case-insensitive).
DEFAULT
if format == null or format does not denote a
valid file format string.public java.lang.String toString()
toString
in class java.lang.Object
getLineSeparator()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |