src/java.desktop/share/classes/javax/sound/sampled/AudioFileFormat.java

Print this page
rev 10520 : 8055723[client]: Replace concat String to append in StringBuilder parameters
Contributed-by: Otavio Santana <otaviojava@java.net>

*** 270,299 **** * @return the file format as a string */ @Override public String toString() { ! StringBuffer buf = new StringBuffer(); //$$fb2002-11-01: fix for 4672864: AudioFileFormat.toString() throws unexpected NullPointerException if (type != null) { ! buf.append(type.toString() + " (." + type.getExtension() + ") file"); } else { ! buf.append("unknown file format"); } if (byteLength != AudioSystem.NOT_SPECIFIED) { ! buf.append(", byte length: " + byteLength); } ! buf.append(", data format: " + format); if (frameLength != AudioSystem.NOT_SPECIFIED) { ! buf.append(", frame length: " + frameLength); } ! ! return new String(buf); } /** * An instance of the {@code Type} class represents one of the standard * types of audio file. Static instances are provided for the common types. --- 270,298 ---- * @return the file format as a string */ @Override public String toString() { ! StringBuilder sb = new StringBuilder(); //$$fb2002-11-01: fix for 4672864: AudioFileFormat.toString() throws unexpected NullPointerException if (type != null) { ! sb.append(type).append(" (.").append(type.getExtension()).append(") file"); } else { ! sb.append("unknown file format"); } if (byteLength != AudioSystem.NOT_SPECIFIED) { ! sb.append(", byte length: ").append(byteLength); } ! sb.append(", data format: ").append(format); if (frameLength != AudioSystem.NOT_SPECIFIED) { ! sb.append(", frame length: ").append(frameLength); } ! return sb.toString(); } /** * An instance of the {@code Type} class represents one of the standard * types of audio file. Static instances are provided for the common types.