Fix a 1.5 API dependency the slipped in.

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@384634 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Hiram R. Chirino 2006-03-09 22:44:16 +00:00
parent fd5ce05c1d
commit 7b69145159
1 changed files with 14 additions and 1 deletions

View File

@ -227,7 +227,20 @@ public class WireFormatInfo implements Command, MarshallAware {
p = getProperties();
} catch (IOException e) {
}
return "WireFormatInfo { version="+version+", properties="+p+", magic="+Arrays.toString(magic)+"}";
return "WireFormatInfo { version="+version+", properties="+p+", magic="+toString(magic)+"}";
}
private String toString(byte []data) {
StringBuffer sb = new StringBuffer();
sb.append('[');
for (int i = 0; i < data.length; i++) {
if( i != 0 ) {
sb.append(',');
}
sb.append((char)data[i]);
}
sb.append(']');
return sb.toString();
}
///////////////////////////////////////////////////////////////