Package org.matheclipse.core.io
Enum Extension
- java.lang.Object
-
- java.lang.Enum<Extension>
-
- org.matheclipse.core.io.Extension
-
- All Implemented Interfaces:
Serializable,Comparable<Extension>
public enum Extension extends Enum<Extension>
File extensions format.See Symja's
Import()andExport()functions.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BMPuncompressed loss-less image format, no alpha channelCSVtableDATDataDOTgraph (theory) formatEXPRESSIONJSONExpressionJSONGIFanimation formatGRAPHMLgraph (theory) formatGZcompressed version of another format, for instance csv.gzJPEGcompressed, lossy image formatJSONJSONMMATLAB m filePNGcompressed image format with alpha channelRAWJSONRawJSONSTRINGtext formatTABLEtable formatTSVTab-Separated ValuesTXTplain text formatWXFWXF format
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ExtensionexportExtension(String extensionString)DetermineExtensionformat from the extension string.static ExtensionexportFilename(String filename)DetermineExtensionformat from the filename's extension.static ExtensionimportExtension(String extensionString)DetermineExtensionformat from the extension string.static ExtensionimportFilename(String filename)DetermineExtensionformat from the filename's extension.static booleanisAllowedExtension(String extensionString)static Extensionof(String string)static ExtensionvalueOf(String name)Returns the enum constant of this type with the specified name.static Extension[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
BMP
public static final Extension BMP
uncompressed loss-less image format, no alpha channel
-
CSV
public static final Extension CSV
table
-
DAT
public static final Extension DAT
Data
-
DOT
public static final Extension DOT
graph (theory) format
-
EXPRESSIONJSON
public static final Extension EXPRESSIONJSON
ExpressionJSON
-
GIF
public static final Extension GIF
animation format
-
GRAPHML
public static final Extension GRAPHML
graph (theory) format
-
GZ
public static final Extension GZ
compressed version of another format, for instance csv.gz
-
JPEG
public static final Extension JPEG
compressed, lossy image format
-
JSON
public static final Extension JSON
JSON
-
M
public static final Extension M
MATLAB m file
-
PNG
public static final Extension PNG
compressed image format with alpha channel
-
RAWJSON
public static final Extension RAWJSON
RawJSON
-
STRING
public static final Extension STRING
text format
-
TABLE
public static final Extension TABLE
table format
-
TSV
public static final Extension TSV
Tab-Separated Values
-
TXT
public static final Extension TXT
plain text format
-
WXF
public static final Extension WXF
WXF format
-
-
Method Detail
-
values
public static Extension[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Extension c : Extension.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Extension valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
isAllowedExtension
public static boolean isAllowedExtension(String extensionString)
-
exportFilename
public static Extension exportFilename(String filename)
DetermineExtensionformat from the filename's extension. If noExtensioncan be determined returnDAT.- Parameters:
filename-- Returns:
-
exportExtension
public static Extension exportExtension(String extensionString)
DetermineExtensionformat from the extension string. If noExtensioncan be determined returnDAT.- Parameters:
extensionString-- Returns:
-
importFilename
public static Extension importFilename(String filename)
DetermineExtensionformat from the filename's extension. If noExtensioncan be determined returnSTRING.- Parameters:
filename-- Returns:
-
importExtension
public static Extension importExtension(String extensionString)
DetermineExtensionformat from the extension string. If noExtensioncan be determined returnSTRING.- Parameters:
extensionString-- Returns:
-
of
public static Extension of(String string)
- Parameters:
string-- Returns:
- Throws:
IllegalArgumentException- if given string does not match any known file types
-
-