public abstract class AbstractString extends AbstractDataType
frameBody, identifier, logger, size, TYPE_ELEMENT, value
Modifier | Constructor and Description |
---|---|
protected |
AbstractString(AbstractString object)
Copy constructor
|
protected |
AbstractString(String identifier,
AbstractTagFrameBody frameBody)
Creates a new datatype
|
|
AbstractString(String identifier,
AbstractTagFrameBody frameBody,
String value)
Creates a new datatype, with value
|
Modifier and Type | Method and Description |
---|---|
boolean |
canBeEncoded()
Check the value can be encoded with the specified encoding
|
protected CharsetDecoder |
getCorrectDecoder(ByteBuffer inBuffer)
If they have specified UTF-16 then decoder works out by looking at BOM
but if missing we have to make an educated guess otherwise just use
specified decoder
|
int |
getSize()
Return the size in bytes of this datatype as it was/is held in file this
will be effected by the encoding type.
|
protected Charset |
getTextEncodingCharSet()
Get the text encoding being used.
|
protected void |
setSize(int size)
Sets the size in bytes of this data type.
|
String |
toString()
Return String representation of data type
|
createStructure, equals, getBody, getIdentifier, getValue, readByteArray, readByteArray, setBody, setValue, writeByteArray
protected AbstractString(String identifier, AbstractTagFrameBody frameBody)
identifier
- frameBody
- public AbstractString(String identifier, AbstractTagFrameBody frameBody, String value)
identifier
- frameBody
- value
- protected AbstractString(AbstractString object)
object
- public int getSize()
getSize
in class AbstractDataType
protected void setSize(int size)
size
- public String toString()
public boolean canBeEncoded()
protected CharsetDecoder getCorrectDecoder(ByteBuffer inBuffer)
inBuffer
- protected Charset getTextEncodingCharSet()
Copyright © 2005–2020 jthink.net. All rights reserved.