From 0444724233cb14df5c337220066c5d31b199a55e Mon Sep 17 00:00:00 2001 From: senft-lap Date: Tue, 6 Nov 2012 16:07:59 +0100 Subject: [PATCH] Fixed typo --- .../src/buffered/BufferedNetworkStack.java | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/ws2012/P2P/uebungen/2/p2p_ex2/src/buffered/BufferedNetworkStack.java b/ws2012/P2P/uebungen/2/p2p_ex2/src/buffered/BufferedNetworkStack.java index 760e70c7..5c4e7c83 100644 --- a/ws2012/P2P/uebungen/2/p2p_ex2/src/buffered/BufferedNetworkStack.java +++ b/ws2012/P2P/uebungen/2/p2p_ex2/src/buffered/BufferedNetworkStack.java @@ -16,16 +16,16 @@ class BufferedNetworkStack { */ public class Element { public int id; - public String[] cunks; + public String[] chunks; public Element(int size, int id) { - cunks = new String[size]; + chunks = new String[size]; this.id = id; System.out.println("Created new Element, size: " + size); } public boolean isComplete() { - for (String s : cunks) { + for (String s : chunks) { if (s == null || s.isEmpty()) { return false; } @@ -35,24 +35,15 @@ class BufferedNetworkStack { public String toString() { StringBuilder result = new StringBuilder(16); - for (String s : cunks) { - // if (!s.isEmpty()) { + for (String s : chunks) { result.append(s); - // } } - return result.toString(); - } } private DatagramChannel channel; - protected static final byte CMD_PUSH = '0'; - protected static final byte CMD_DATA = '1'; - protected static final byte CMD_POP = '2'; - protected static final byte CMD_PRINT = '3'; - protected static final int BUF_SIZE = 4; private Stack stack;