Package eu.bandm.tools.d2d2.infra
Class MemString.CharMem<D2>
java.lang.Object
eu.bandm.tools.d2d2.infra.MemString.CharMem<D2>
The data storage underlying every
MemString.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected char[]The character data.protected D2The indication of the source of the data, for diagnosis messages. -
Constructor Summary
ConstructorsConstructorDescriptionCreate an instance with the given name asoriginalAddressand the data from the file.Create an instance with the given name asoriginalAddressand the data from the file, with the given encoding.Create an instance with the given name asoriginalAddressand the data from the reader.Create an instance with the given name asoriginalAddressand the data from the string. -
Method Summary
Modifier and TypeMethodDescriptionvoidAppend the given string to the character data.voiddump()printa all character data to System.outvoiddump(PrintStream p) Prints all character data to the given output.char[]get_data()Return the data.Returns the string stored asoriginalAddress, for diagnosis messages.(package private) voidReads the string contents into the memory object, as its only contents.
-
Field Details
-
originalAddress
The indication of the source of the data, for diagnosis messages. ATTENTION in case of file-read, this should correspond. -
data
protected char[] dataThe character data.
-
-
Constructor Details
-
CharMem
Create an instance with the given name asoriginalAddressand the data from the file. Uses UTF_8 encoding.- Throws:
IOException
-
CharMem
Create an instance with the given name asoriginalAddressand the data from the file, with the given encoding.- Throws:
IOException
-
CharMem
Create an instance with the given name asoriginalAddressand the data from the reader.- Throws:
IOException
-
CharMem
Create an instance with the given name asoriginalAddressand the data from the string.
-
-
Method Details
-
get_originalAddress
Returns the string stored asoriginalAddress, for diagnosis messages. -
get_data
public char[] get_data()Return the data. -
append
Append the given string to the character data. -
initData
Reads the string contents into the memory object, as its only contents. -
dump
Prints all character data to the given output. -
dump
public void dump()printa all character data to System.out
-