public class StringFixedLength extends AbstractString
frameBody, identifier, logger, size, TYPE_ELEMENT, value
Constructor and Description |
---|
StringFixedLength(String identifier,
AbstractTagFrameBody frameBody,
int size)
Creates a new ObjectStringFixedsize datatype.
|
StringFixedLength(StringFixedLength copyObject) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
protected Charset |
getTextEncodingCharSet()
Get the text encoding being used.
|
void |
readByteArray(byte[] arr,
int offset)
Read a string from buffer of fixed size(size has already been set in constructor)
|
byte[] |
writeByteArray()
Write String into byte array
The string will be adjusted to ensure the correct number of bytes are written, If the current value is null
or to short the written value will have the 'space' character appended to ensure this.
|
canBeEncoded, getCorrectDecoder, getSize, setSize, toString
createStructure, getBody, getIdentifier, getValue, readByteArray, setBody, setValue
public StringFixedLength(String identifier, AbstractTagFrameBody frameBody, int size)
identifier
- frameBody
- size
- IllegalArgumentException
public StringFixedLength(StringFixedLength copyObject)
public boolean equals(Object obj)
equals
in class AbstractDataType
obj
- public void readByteArray(byte[] arr, int offset) throws InvalidDataTypeException
readByteArray
in class AbstractDataType
arr
- this is the buffer for the frameoffset
- this is where to start reading in the buffer for this fieldInvalidDataTypeException
public byte[] writeByteArray()
writeByteArray
in class AbstractDataType
protected Charset getTextEncodingCharSet()
AbstractString
getTextEncodingCharSet
in class AbstractString
Copyright © 2005–2020 jthink.net. All rights reserved.