- Code Formatierung durch eclipse
authorfelix <felix@a944a559-bf0e-0410-8ddc-85264b264b6c>
Thu, 17 May 2007 14:44:26 +0000 (14:44 +0000)
committerfelix <felix@a944a559-bf0e-0410-8ddc-85264b264b6c>
Thu, 17 May 2007 14:44:26 +0000 (14:44 +0000)
git-svn-id: https://www.internetallee.de/svn/bytewurf@44 a944a559-bf0e-0410-8ddc-85264b264b6c

projekte/netzschalter/src/de/bytewurf/projekte/netzschalter/Command.java

index 3816478..23c8380 100644 (file)
@@ -11,37 +11,40 @@ package de.bytewurf.projekte.netzschalter;
  */
 public class Command {
        byte[] commandBytes;
-       
+
        Command(String commandString) {
                String[] commands = commandString.trim().split("[\t\n ,]+", 100);
                commandBytes = new byte[commands.length];
                try {
                        for (int i = 0; i < commands.length; i++) {
-                               commandBytes[i] = Integer.decode(commands[i]).byteValue(); 
+                               commandBytes[i] = Integer.decode(commands[i]).byteValue();
                        }
                } catch (NumberFormatException e) {
                        commandBytes = null;
-                       throw new RuntimeException("Ungültige Zahlen eingegeben" + e.toString());
+                       throw new RuntimeException("Ungültige Zahlen eingegeben"
+                                       + e.toString());
                }
        }
-       
+
        Command(byte[] commandBytes) {
                if (commandBytes == null)
-                       throw new IllegalArgumentException("Es muss ein Array mit bytes übergeben werden");
-               
+                       throw new IllegalArgumentException(
+                                       "Es muss ein Array mit bytes übergeben werden");
+
                this.commandBytes = commandBytes;
        }
-       
+
        public String toString() {
                StringBuffer result = new StringBuffer();
                for (int i = 0; i < commandBytes.length; i++) {
                        result.append("0x" + Integer.toHexString(commandBytes[i] & 0xFF));
-                       if (i < commandBytes.length - 1);
-                               result.append(", ");
+                       if (i < commandBytes.length - 1)
+                               ;
+                       result.append(", ");
                }
                return result.toString();
        }
-       
+
        public byte[] getCommandBytes() {
                if (commandBytes == null)
                        throw new RuntimeException("No Command configured yet.");