Cleaned up server.Element

This commit is contained in:
senft-lap 2012-11-09 22:29:39 +01:00
parent e0d8285b57
commit 74cdefa6f8

View File

@ -10,12 +10,11 @@ public class Element {
public Element(int size, int id) {
chunks = new String[size];
this.id = id;
// System.out.println("Created new Element, size: " + size);
}
public boolean isComplete() {
for (String s : chunks) {
if (s == null || s.isEmpty()) {
if (s == null) {
return false;
}
}
@ -27,6 +26,17 @@ public class Element {
for (String s : chunks) {
result.append(s);
}
// int chunksFinished = 0;
// for (int i = 0; i < chunks.length; i++) {
// if (chunks[i] != null) {
// chunksFinished++;
// }
// }
// result.append("BufferedNetworkStack temporary Element: ");
// result.append(chunksFinished).append("/").append(chunks.length);
// result.append(" chunks finished");
return result.toString();
}
}