public class NumberFixedLength extends AbstractDataType
frameBody, identifier, logger, size, TYPE_ELEMENT, value
Constructor and Description |
---|
NumberFixedLength(NumberFixedLength copy) |
NumberFixedLength(String identifier,
AbstractTagFrameBody frameBody,
int size)
Creates a new ObjectNumberFixedLength datatype.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
int |
getSize()
Return size
|
void |
readByteArray(byte[] arr,
int offset)
Read the number from the byte array
|
void |
setSize(int size)
Set Size in Bytes of this Object
|
void |
setValue(Object value)
Set the value held by this datatype, this is used typically used when the
user wants to modify the value in an existing frame.
|
String |
toString() |
byte[] |
writeByteArray()
Write data to byte array
|
createStructure, getBody, getIdentifier, getValue, readByteArray, setBody
public NumberFixedLength(String identifier, AbstractTagFrameBody frameBody, int size)
identifier
- frameBody
- size
- the number of significant places that the number is held toIllegalArgumentException
public NumberFixedLength(NumberFixedLength copy)
public void setSize(int size)
size
- in bytes that this number will be held aspublic int getSize()
getSize
in class AbstractDataType
public void setValue(Object value)
AbstractDataType
setValue
in class AbstractDataType
public boolean equals(Object obj)
equals
in class AbstractDataType
obj
- public void readByteArray(byte[] arr, int offset) throws InvalidDataTypeException
readByteArray
in class AbstractDataType
arr
- offset
- NullPointerException
IndexOutOfBoundsException
InvalidDataTypeException
public String toString()
public byte[] writeByteArray()
writeByteArray
in class AbstractDataType
Copyright © 2005–2020 jthink.net. All rights reserved.