Package eu.bandm.tools.d2d2.infra
Class MemString.CharMem
java.lang.Object
eu.bandm.tools.d2d2.infra.MemString.CharMem
- Enclosing class:
- MemString
The data storage underlying every
MemString
.-
Field Summary
Modifier and TypeFieldDescriptionprotected char[]
The character data.protected String
The indication of the source of the data, for diagnosis messages. -
Constructor Summary
ConstructorDescriptionCreate an instance with theFile.getCanonicalPath()
asoriginalAddress
and the data from the file.Create an instance with the given name asoriginalAddress
and the data from the file.Create an instance with the given name asoriginalAddress
and the data from the file, with the given encoding.Create an instance with the given name asoriginalAddress
and the data from the reader.Create an instance with the given name asoriginalAddress
and the data from the string. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Append the given string to the character data.void
dump()
printa all character data to System.outvoid
dump
(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) void
-
Field Details
-
originalAddress
The indication of the source of the data, for diagnosis messages. When constructed from a file byCharMem(File)
, this is the path of the file from which he character data had been read. -
data
protected char[] dataThe character data.
-
-
Constructor Details
-
CharMem
Create an instance with theFile.getCanonicalPath()
asoriginalAddress
and the data from the file. Uses UTF_8 encoding.- Throws:
IOException
-
CharMem
Create an instance with the given name asoriginalAddress
and the data from the file. Uses UTF_8 encoding.- Throws:
IOException
-
CharMem
Create an instance with the given name asoriginalAddress
and the data from the file, with the given encoding.- Throws:
IOException
-
CharMem
Create an instance with the given name asoriginalAddress
and the data from the reader.- Throws:
IOException
-
CharMem
Create an instance with the given name asoriginalAddress
and 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
-
dump
Prints all character data to the given output. -
dump
public void dump()printa all character data to System.out
-