/* * [DataType.java] * * Summary: enumeration of the various types of data you can read or write in Java. * * Copyright: (c) 1997-2017 Roedy Green, Canadian Mind Products, http://mindprod.com * * Licence: This software may be copied and used freely for any purpose but military. * http://mindprod.com/contact/nonmil.html * * Requires: JDK 1.8+ * * Created with: JetBrains IntelliJ IDEA IDE http://www.jetbrains.com/idea/ * * Version History: * 1.0 2007-07-12 Created with IntelliJ IDEA. */ package com.mindprod.fileio; /** * enumeration of the various types of data you can read or write in Java. * * @author Roedy Green, Canadian Mind Products * @version 1.0 2007-07-12 Created with IntelliJ IDEA. * @since 2007-07-12 */ public enum DataType { /** * raw 8-bit bytes, not necessarily human-readable. */ RAWBYTES( "raw untranslated bytes" ), /** * ASCII 7 or 8-bit, default encoding. */ LOCALEENCODED( "Locale-encoded chars ( usually 8 bit )" ), /** * locale-encoded 8-bit, e.g. IBMOEM Cp437 encoding, or UTF-8 */ ENCODED( "encoded chars" ), /** * UTF-16 */ UNICODE( "Unicode 16-bit chars" ), /* * big-endian binary data, Java standard. */ BIGEND( "big-endian ( Java ) binary" ), /** * little-endian binary data, Wintel standard. */ LITTLEEND( "little-endian ( Intel ) binary" ), /** * serialised objects. */ SERIALISED( "serialised binary objects" ); /** * description of the enum */ private final String desc; /** * constructor * * @param desc wording to describe this type of data */ DataType( String desc ) { this.desc = desc; } /** * HowToProcess we display this enum. * * @return description. */ public String toString() { return desc; } }