
org.refcodes.data.Ascii Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of refcodes-data Show documentation
Show all versions of refcodes-data Show documentation
Artifact with commonly used constants.
// /////////////////////////////////////////////////////////////////////////////
// REFCODES.ORG
// /////////////////////////////////////////////////////////////////////////////
// This code is copyright (c) by Siegfried Steiner, Munich, Germany, distributed
// on an "AS IS" BASIS WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, and licen-
// sed under the following (see "http://en.wikipedia.org/wiki/Multi-licensing")
// licenses:
// -----------------------------------------------------------------------------
// GNU General Public License, v3.0 ("http://www.gnu.org/licenses/gpl-3.0.html")
// -----------------------------------------------------------------------------
// Apache License, v2.0 ("http://www.apache.org/licenses/LICENSE-2.0")
// -----------------------------------------------------------------------------
// Please contact the copyright holding author(s) of the software artifacts in
// question for licensing issues not being covered by the above listed licenses,
// also regarding commercial licensing models or regarding the compatibility
// with other open source licenses.
// /////////////////////////////////////////////////////////////////////////////
package org.refcodes.data;
import org.refcodes.mixin.CharAccessor;
import org.refcodes.mixin.CodeAccessor;
/**
* Some ASCII codes used by REFCODES.ORG artifacts.
*/
public enum Ascii implements CodeAccessor, CharAccessor {
/**
* ASCII(0) = <NULL>
*
* "Null"
*/
NULL((byte) 0),
/**
* ASCII(1) = <SOH>
*
* "Start of Heading"
*/
SOH((byte) 1),
/**
* ASCII(2) = <STX>
*
* "Start of Text"
*/
STX((byte) 2),
/**
* ASCII(3) = <ETX>
*
* "End of Text"
*/
ETX((byte) 3),
/**
* ASCII(4) = <EOT>
*
* "End of Transmission"
*/
EOT((byte) 4),
/**
* ASCII(5) = <ENQ>
*
* "Enquiry"
*/
ENQ((byte) 5),
/**
* ASCII(6) = <ACK>
*
* "Acknowledgement"
*/
ACK((byte) 6),
/**
* ASCII(7) = <BELL>
*
* "BEL"
*/
BELL((byte) 7),
/**
* * ASCII(16) = <DLE>
*
* Data Link Escape
*/
DLE((byte) 16),
/**
* ASCII(21) = <NAK>
*
* "Negative Acknowledgement"
*/
NAK((byte) 21),
/**
* ASCII(22) = <SYN>
*
* "Synchronous Idle"
*/
SYN((byte) 22),
/**
* ASCII(24) = <CAN>
*
* "Cancel"
*/
CAN((byte) 24),
/**
* ASCII(25) = <EN>
*
* "End of Medium"
*/
EM((byte) 25),
/**
* ASCII(27) = <ESC>
*
* "Escape"
*/
ESC((byte) 27);
private byte _asciiCode;
private Ascii( byte aAsciiCode ) {
_asciiCode = aAsciiCode;
}
/**
* {@inheritDoc}
*/
@Override
public Byte getCode() {
return _asciiCode;
}
/**
* {@inheritDoc}
*/
@Override
public char getChar() {
return (char) ( _asciiCode & 0xFF );
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy