[DS-707] String concatenation

git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@5499 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
Graham Triggs
2010-10-20 21:38:52 +00:00
parent 703944d4bf
commit c17cbc0029
5 changed files with 73 additions and 69 deletions

View File

@@ -263,17 +263,18 @@ public class InstallItem
Bitstream[] bitstreams = myitem.getNonInternalBitstreams();
// Create provenance description
String mymessage = "No. of bitstreams: " + bitstreams.length + "\n";
StringBuilder myMessage = new StringBuilder();
myMessage.append("No. of bitstreams: ").append(bitstreams.length).append("\n");
// Add sizes and checksums of bitstreams
for (int j = 0; j < bitstreams.length; j++)
{
mymessage = mymessage + bitstreams[j].getName() + ": "
+ bitstreams[j].getSize() + " bytes, checksum: "
+ bitstreams[j].getChecksum() + " ("
+ bitstreams[j].getChecksumAlgorithm() + ")\n";
myMessage.append(bitstreams[j].getName()).append(": ")
.append(bitstreams[j].getSize()).append(" bytes, checksum: ")
.append(bitstreams[j].getChecksum()).append(" (")
.append(bitstreams[j].getChecksumAlgorithm()).append(")\n");
}
return mymessage;
return myMessage.toString();
}
}