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

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -