Java simple string print

Is there a more computationally-efficient way to write a simple constant string than this:

private void parseLabel(FileOutputStream asciiout) {
    asciiout.write(new String("Label: ").getBytes());
}

Seems that the alternative would be to allocate a byte array, put the string in the byte array, and then print the byte array...thought there would be something more direct.

Answers


private void parseLabel(FileOutputStream asciiout) {
    asciiout.write("Label: ".getBytes());
}

Need Your Help

What NEW features has WCF in .NET Framework 4 vs .NET Framework 3.5?

c# .net wcf .net-3.5 .net-4.0

What NEW features has WCF in .NET Framework 4 vs .NET Framework 3.5? What Is new, what was fixed (in general - I do not want to get into bug fixed numbers=)?