Is there anything (any way) to concatenate java Strings faster than StringWriter? -
After
I am pulling a group of simple data and a bigger construction (1KB - 2KB) string. I am new to this language, but after reading, this possibility seems to be the fastest (i.e. the least copied volume):
string tmpTable = "& lt; table border = \ "1 \" & gt; "+ System.lineSeparator (); StringWrite String Water = New String Vitre (1024); String tr = ""; stringWriter.append (tmpTable); (Project p: projectSet) {TR = String.Format (trFmt, p.getId (), p.getTitle (), p.getPriority (), p.getStatus ()); StringWriter.append (tr); } StringWriter.append ("& lt; / table & gt;" + System.lineSeparator ()); stringWriter.flush (); stringWriter.close (); // Old habits Is there a "better" way?
If it was 'C', then I might be inclined to use a "four * argv []" like the deal
is the standard to use. It has the initial buffer size maker and append methods you are looking for. To get the outside price, call the Builder (). There is no way (requirement) to shut down .
Comments
Post a Comment