public class SecsFormat22 extends java.lang.Object implements SecsFormat
Encoding Code | SECS Encoding Scheme | Java Canonical Name
1 | ISO 10646 UCS-2 | UnicodeBig
2 | UTF-8 | UTF8
3 | ISO 646-1991 | ASCII
4 | ISO 8859-1 | ISO8859_1
5 | ISO 8859-11 | ISO8859_11 (1)
6 | TIS 620 | TIS620
7 | IS 13194 (1991) | ISCII(1)
8 | Shift JIS | SJIS
9 | EUC-JP | EUC_JP
10 | EUC-KR | EUC_KR
11 | Simp. Chinese (GB) | ISO2022CN_GB
12 | EUC-CN | EUC_CN
13 | Trad. Chinese Big5 | Big5
14 | EUC-TW | EUC_TW
(1)NOTE:No known font support for this type
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
cvsRev |
java.lang.String |
encoding
This is the encoding used by this format.
|
int |
encodingCode
The encoding code.
|
int |
length
The length of the format.
|
java.lang.String |
theData
The data for this object.
|
Constructor and Description |
---|
SecsFormat22()
Creates an empty string using the default encoding.
|
SecsFormat22(byte[] newValue,
int encodingCode) |
SecsFormat22(char[] newValue,
int encodingCode) |
SecsFormat22(java.lang.String newValue,
int encodingCode)
Create a new object with a value, encoding and code.
|
SecsFormat22(java.lang.String newValue,
java.lang.String encoding,
int encodingCode)
Create a new object with a value, encoding and code.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
SecsFormat[] |
getArray()
This allows for arrays of secsformats (not a list of secsformats).
|
boolean |
getBoolValue()
Returns the true if the length of the data is non-zero.
|
byte |
getByteValue()
Returns the data converted to a byte.
|
double |
getDoubleValue()
Returns the data converted to a double.
|
float |
getFloatValue()
Returns the data converted to a float.
|
byte[] |
getFormattedBytes()
Returns the list in a manner suitable for encoding directly into a SECS
message byte stream used over SECSI or HSMS transport.
|
int |
getIntValue()
Returns the data converted to a int.
|
int |
getLength()
Returns the length of the format.
|
long |
getLongValue()
Returns the data converted to a long.
|
int |
getNumberOfLengthBytes()
Returns the number of length bytes.
|
short |
getShortValue()
Returns the data converted to a short.
|
java.lang.String |
getStringValue()
Returns the data as a string.
|
int |
hashCode() |
void |
registerEncoding(int encodingCode,
java.lang.String encoding)
Register the encoding for the code.
|
void |
setArray(SecsFormat[] newValues)
This allows for a standard way to set arrays of secsformats.
|
void |
setDataFromByteArray(byte[] temp,
int offset,
int length)
stores the incoming value in the format object.
|
void |
setLength(int newValue)
Sets the length of the format.
|
void |
setNumberOfLengthBytes(int numberOfLengthBytes)
Sets the number of length bytes to send when the format is encoded.
|
int |
size()
Returns the size of the data.
|
java.lang.String |
toString()
Returns the SML string representing this value
|
java.lang.String |
toString(int indentCount)
Returns the indented SML string representing this value.
|
boolean |
zeroLength()
Returns true if the format is zero length.
|
public static final java.lang.String cvsRev
public java.lang.String encoding
public int encodingCode
public int length
public java.lang.String theData
public SecsFormat22()
public SecsFormat22(byte[] newValue, int encodingCode) throws SecsException
SecsException
public SecsFormat22(char[] newValue, int encodingCode) throws SecsException
SecsException
public SecsFormat22(java.lang.String newValue, int encodingCode) throws SecsException
SecsException
public SecsFormat22(java.lang.String newValue, java.lang.String encoding, int encodingCode)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public SecsFormat[] getArray()
getArray
in interface SecsFormat
public boolean getBoolValue()
getBoolValue
in interface SecsFormat
public byte getByteValue()
getByteValue
in interface SecsFormat
public double getDoubleValue()
getDoubleValue
in interface SecsFormat
public float getFloatValue()
getFloatValue
in interface SecsFormat
public byte[] getFormattedBytes() throws SecsException
getFormattedBytes
in interface SecsFormat
SecsException
public int getIntValue()
getIntValue
in interface SecsFormat
public int getLength()
SecsFormat
getLength
in interface SecsFormat
public long getLongValue()
getLongValue
in interface SecsFormat
public int getNumberOfLengthBytes()
getNumberOfLengthBytes
in interface SecsFormat
public short getShortValue()
getShortValue
in interface SecsFormat
public java.lang.String getStringValue()
getStringValue
in interface SecsFormat
public int hashCode()
hashCode
in class java.lang.Object
public void registerEncoding(int encodingCode, java.lang.String encoding)
public void setArray(SecsFormat[] newValues) throws SecsException
setArray
in interface SecsFormat
SecsException
public void setDataFromByteArray(byte[] temp, int offset, int length) throws SecsException
SecsFormat
setDataFromByteArray
in interface SecsFormat
SecsException
public void setLength(int newValue)
SecsFormat
setLength
in interface SecsFormat
newValue
- the new lengthpublic void setNumberOfLengthBytes(int numberOfLengthBytes) throws java.lang.IllegalArgumentException
setNumberOfLengthBytes
in interface SecsFormat
numberOfLengthBytes
- the new number of length bytes. This should
be 1, 2,3 or -1 to indicate the defaultjava.lang.IllegalArgumentException
- if the value is not 1, 2, 3 or -1public int size()
public java.lang.String toString()
public java.lang.String toString(int indentCount)
toString
in interface SecsFormat
the
- indentationpublic boolean zeroLength()
SecsFormat
zeroLength
in interface SecsFormat
Copyright © 1999-2025 ErgoTech Systems, Inc. All Rights Reserved.