src/java.desktop/share/classes/javax/sound/sampled/DataLine.java
Print this page
rev 10536 : 8055723[client]: Replace concat String to append in StringBuilder parameters
Contributed-by: Otavio Santana <otaviojava@java.net>
*** 470,492 ****
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
! if ( (formats.length == 1) && (formats[0] != null) ) {
! sb.append(" supporting format " + formats[0]);
} else if (getFormats().length > 1) {
! sb.append(" supporting " + getFormats().length + " audio formats");
}
! if ( (minBufferSize != AudioSystem.NOT_SPECIFIED) && (maxBufferSize != AudioSystem.NOT_SPECIFIED) ) {
! sb.append(", and buffers of " + minBufferSize + " to " + maxBufferSize + " bytes");
! } else if ( (minBufferSize != AudioSystem.NOT_SPECIFIED) && (minBufferSize > 0) ) {
! sb.append(", and buffers of at least " + minBufferSize + " bytes");
} else if (maxBufferSize != AudioSystem.NOT_SPECIFIED) {
! sb.append(", and buffers of up to " + minBufferSize + " bytes");
}
! return new String(super.toString() + sb);
}
}
}
--- 470,498 ----
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
! if ((formats.length == 1) && (formats[0] != null)) {
! sb.append(" supporting format ").append(formats[0]);
} else if (getFormats().length > 1) {
! sb.append(" supporting ").append(getFormats().length)
! .append(" audio formats");
}
! if ((minBufferSize != AudioSystem.NOT_SPECIFIED)
! && (maxBufferSize != AudioSystem.NOT_SPECIFIED)) {
! sb.append(", and buffers of ").append(minBufferSize)
! .append(" to ").append(maxBufferSize).append(" bytes");
! } else if ((minBufferSize != AudioSystem.NOT_SPECIFIED)
! && (minBufferSize > 0)) {
! sb.append(", and buffers of at least ").append(minBufferSize)
! .append(" bytes");
} else if (maxBufferSize != AudioSystem.NOT_SPECIFIED) {
! sb.append(", and buffers of up to ").append(minBufferSize)
! .append(" bytes");
}
! return super.toString() + sb.toString();
}
}
}