Whitespace cleanup only

git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@5097 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/java/com/tigervnc/rfb/AliasParameter.java b/java/com/tigervnc/rfb/AliasParameter.java
index 120497c..a1ae838 100644
--- a/java/com/tigervnc/rfb/AliasParameter.java
+++ b/java/com/tigervnc/rfb/AliasParameter.java
@@ -1,17 +1,17 @@
 /* Copyright (C) 2002-2005 RealVNC Ltd.  All Rights Reserved.
  * Copyright 2004-2005 Cendio AB.
  * Copyright 2012 Brian P. Hinz
- * 
+ *
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this software; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
@@ -21,7 +21,7 @@
 package com.tigervnc.rfb;
 
 public class AliasParameter extends VoidParameter {
-  public AliasParameter(String name_, String desc_, VoidParameter param_, 
+  public AliasParameter(String name_, String desc_, VoidParameter param_,
                         Configuration.ConfigurationObject co)
   {
     super(name_, desc_, co);
diff --git a/java/com/tigervnc/rfb/AuthFailureException.java b/java/com/tigervnc/rfb/AuthFailureException.java
index b2e5405..542270c 100644
--- a/java/com/tigervnc/rfb/AuthFailureException.java
+++ b/java/com/tigervnc/rfb/AuthFailureException.java
@@ -1,15 +1,15 @@
 /* Copyright (C) 2002-2005 RealVNC Ltd.  All Rights Reserved.
- * 
+ *
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this software; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
diff --git a/java/com/tigervnc/rfb/BoolParameter.java b/java/com/tigervnc/rfb/BoolParameter.java
index 0806be4..fc31d7a 100644
--- a/java/com/tigervnc/rfb/BoolParameter.java
+++ b/java/com/tigervnc/rfb/BoolParameter.java
@@ -1,17 +1,17 @@
 /* Copyright (C) 2002-2005 RealVNC Ltd.  All Rights Reserved.
  * Copyright 2004-2005 Cendio AB.
  * Copyright 2012 Brian P. Hinz
- * 
+ *
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this software; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
@@ -50,7 +50,7 @@
   }
 
   public boolean setParam() { setParam(true); return true; }
-  public void setParam(boolean b) { 
+  public void setParam(boolean b) {
     if (immutable) return;
     value = b;
   }
diff --git a/java/com/tigervnc/rfb/CConnection.java b/java/com/tigervnc/rfb/CConnection.java
index a923028..c354868 100644
--- a/java/com/tigervnc/rfb/CConnection.java
+++ b/java/com/tigervnc/rfb/CConnection.java
@@ -1,16 +1,16 @@
 /* Copyright (C) 2002-2005 RealVNC Ltd.  All Rights Reserved.
  * Copyright (C) 2011-2012 Brian P. Hinz
- * 
+ *
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this software; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
@@ -26,9 +26,9 @@
 
 abstract public class CConnection extends CMsgHandler {
 
-  public CConnection() 
+  public CConnection()
   {
-    csecurity = null; is = null; os = null; reader_ = null; 
+    csecurity = null; is = null; os = null; reader_ = null;
     writer_ = null; shared = false;
     state_ = RFBSTATE_UNINITIALISED; useProtocol3_3 = false;
     security = new SecurityClient();
@@ -48,14 +48,14 @@
   // initialiseProtocol() should be called once the streams and security
   // types are set.  Subsequently, processMsg() should be called whenever
   // there is data to read on the InStream.
-  public final void initialiseProtocol() 
+  public final void initialiseProtocol()
   {
     state_ = RFBSTATE_PROTOCOL_VERSION;
   }
 
   // processMsg() should be called whenever there is data to read on the
   // InStream.  You must have called initialiseProtocol() first.
-  public void processMsg() 
+  public void processMsg()
   {
     switch (state_) {
 
@@ -72,7 +72,7 @@
     }
   }
 
-  private void processVersionMsg() 
+  private void processVersionMsg()
   {
     vlog.debug("reading protocol version");
     if (!cp.readVersion(is)) {
@@ -104,7 +104,7 @@
               cp.majorVersion+"."+cp.minorVersion);
   }
 
-  private void processSecurityTypesMsg() 
+  private void processSecurityTypesMsg()
   {
     vlog.debug("processing security types message");
 
@@ -130,7 +130,7 @@
             break;
           }
         }
-      
+
         if (!secTypes.contains(secType))
           secType = Security.secTypeInvalid;
       } else {
@@ -264,7 +264,7 @@
   // streams over which the RFB protocol is sent (i.e. encrypting/decrypting
   // streams).  Ownership of the streams remains with the caller
   // (i.e. SConnection will not delete them).
-  public final void setStreams(InStream is_, OutStream os_) 
+  public final void setStreams(InStream is_, OutStream os_)
   {
     is = is_;
     os = os_;
@@ -281,7 +281,7 @@
   public void setServerPort(int port) {
     serverPort = port;
   }
- 
+
   public void initSecTypes() {
     nSecTypes = 0;
   }
@@ -312,7 +312,7 @@
   // getCurrentCSecurity() gets the CSecurity instance used for this
   // connection.
   //public CSecurity getCurrentCSecurity() { return security; }
-  
+
   // setClientSecTypeOrder() determines whether the client should obey the
   // server's security type preference, by picking the first server security
   // type that the client supports, or whether it should pick the first type
@@ -344,7 +344,7 @@
   public int state() { return state_; }
 
   protected final void setState(int s) { state_ = s; }
-  
+
   public void fence(int flags, int len, byte[] data)
   {
     super.fence(flags, len, data);
diff --git a/java/com/tigervnc/rfb/CMsgHandler.java b/java/com/tigervnc/rfb/CMsgHandler.java
index 653ee70..dd9767e 100644
--- a/java/com/tigervnc/rfb/CMsgHandler.java
+++ b/java/com/tigervnc/rfb/CMsgHandler.java
@@ -2,17 +2,17 @@
  * Copyright 2009-2011 Pierre Ossman for Cendio AB
  * Copyright (C) 2011 D. R. Commander.  All Rights Reserved.
  * Copyright (C) 2011 Brian P. Hinz
- * 
+ *
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this software; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
@@ -31,7 +31,7 @@
     cp = new ConnParams();
   }
 
-  public void setDesktopSize(int width, int height) 
+  public void setDesktopSize(int width, int height)
   {
     cp.width = width;
     cp.height = height;
@@ -39,10 +39,10 @@
 
   public void setExtendedDesktopSize(int reason, int result,
                                      int width, int height,
-                                     ScreenSet layout) 
+                                     ScreenSet layout)
   {
     cp.supportsSetDesktopSize = true;
-    
+
     if ((reason == screenTypes.reasonClient) && (result != screenTypes.resultSuccess))
       return;
 
@@ -54,27 +54,27 @@
     cp.screenLayout = layout;
   }
 
-  public void setPixelFormat(PixelFormat pf) 
+  public void setPixelFormat(PixelFormat pf)
   {
     cp.setPF(pf);
   }
 
-  public void setName(String name) 
+  public void setName(String name)
   {
     cp.setName(name);
   }
 
-  public void fence(int flags, int len, byte[] data) 
+  public void fence(int flags, int len, byte[] data)
   {
     cp.supportsFence = true;
   }
 
-  public void endOfContinuousUpdates() 
+  public void endOfContinuousUpdates()
   {
     cp.supportsContinuousUpdates = true;
   }
 
-  public void clientRedirect(int port, String host, 
+  public void clientRedirect(int port, String host,
                              String x509subject) {}
 
   public void setCursor(int width, int height, Point hotspot,
@@ -86,7 +86,7 @@
   public void beginRect(Rect r, int encoding) {}
   public void endRect(Rect r, int encoding) {}
 
-  public void setColourMapEntries(int firstColour, int nColours, 
+  public void setColourMapEntries(int firstColour, int nColours,
     int[] rgbs) { }
   public void bell() {}
   public void serverCutText(String str, int len) {}
diff --git a/java/com/tigervnc/rfb/CMsgReader.java b/java/com/tigervnc/rfb/CMsgReader.java
index e47d5d6..71045f3 100644
--- a/java/com/tigervnc/rfb/CMsgReader.java
+++ b/java/com/tigervnc/rfb/CMsgReader.java
@@ -1,15 +1,15 @@
 /* Copyright (C) 2002-2005 RealVNC Ltd.  All Rights Reserved.
- * 
+ *
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this software; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
@@ -27,7 +27,7 @@
 
 abstract public class CMsgReader {
 
-  protected CMsgReader(CMsgHandler handler_, InStream is_) 
+  protected CMsgReader(CMsgHandler handler_, InStream is_)
   {
     imageBufIdealSize = 0;
     handler = handler_;
@@ -37,7 +37,7 @@
     decoders = new Decoder[Encodings.encodingMax+1];
   }
 
-  protected void readSetColourMapEntries() 
+  protected void readSetColourMapEntries()
   {
     is.skip(1);
     int firstColour = is.readU16();
@@ -48,12 +48,12 @@
     handler.setColourMapEntries(firstColour, nColours, rgbs);
   }
 
-  protected void readBell() 
+  protected void readBell()
   {
     handler.bell();
   }
 
-  protected void readServerCutText() 
+  protected void readServerCutText()
   {
     is.skip(3);
     int len = is.readU32();
@@ -73,17 +73,17 @@
     handler.serverCutText(str, len);
   }
 
-  protected void readFramebufferUpdateStart() 
+  protected void readFramebufferUpdateStart()
   {
     handler.framebufferUpdateStart();
   }
 
-  protected void readFramebufferUpdateEnd() 
+  protected void readFramebufferUpdateEnd()
   {
     handler.framebufferUpdateEnd();
   }
 
-  protected void readRect(Rect r, int encoding) 
+  protected void readRect(Rect r, int encoding)
   {
     if ((r.br.x > handler.cp.width) || (r.br.y > handler.cp.height)) {
       vlog.error("Rect too big: "+r.width()+"x"+r.height()+" at "+
@@ -114,14 +114,14 @@
     handler.endRect(r, encoding);
   }
 
-  protected void readCopyRect(Rect r) 
+  protected void readCopyRect(Rect r)
   {
     int srcX = is.readU16();
     int srcY = is.readU16();
     handler.copyRect(r, srcX, srcY);
   }
 
-  protected void readSetCursor(int width, int height, Point hotspot) 
+  protected void readSetCursor(int width, int height, Point hotspot)
   {
     int data_len = width * height;
     int mask_len = ((width+7)/8) * height;
@@ -134,9 +134,9 @@
     handler.setCursor(width, height, hotspot, data, mask);
   }
 
-  public int[] getImageBuf(int required) { return getImageBuf(required, 0, 0); } 
+  public int[] getImageBuf(int required) { return getImageBuf(required, 0, 0); }
 
-  public int[] getImageBuf(int required, int requested, int nPixels) 
+  public int[] getImageBuf(int required, int requested, int nPixels)
   {
     int requiredBytes = required;
     int requestedBytes = requested;
@@ -155,9 +155,9 @@
     return imageBuf;
   }
 
-  public final int bpp() 
+  public final int bpp()
   {
-    return handler.cp.pf().bpp; 
+    return handler.cp.pf().bpp;
   }
 
   abstract public void readServerInit();
diff --git a/java/com/tigervnc/rfb/CMsgReaderV3.java b/java/com/tigervnc/rfb/CMsgReaderV3.java
index f59d237..e09d3bb 100644
--- a/java/com/tigervnc/rfb/CMsgReaderV3.java
+++ b/java/com/tigervnc/rfb/CMsgReaderV3.java
@@ -1,17 +1,17 @@
 /* Copyright (C) 2002-2005 RealVNC Ltd.  All Rights Reserved.
  * Copyright 2009-2011 Pierre Ossman for Cendio AB
  * Copyright (C) 2011 Brian P. Hinz
- * 
+ *
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this software; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
@@ -24,13 +24,13 @@
 
 public class CMsgReaderV3 extends CMsgReader {
 
-  public CMsgReaderV3(CMsgHandler handler_, InStream is_) 
+  public CMsgReaderV3(CMsgHandler handler_, InStream is_)
   {
     super(handler_, is_);
     nUpdateRectsLeft = 0;
   }
 
-  public void readServerInit() 
+  public void readServerInit()
   {
     int width = is.readU16();
     int height = is.readU16();
@@ -43,7 +43,7 @@
     handler.serverInit();
   }
 
-  public void readMsg() 
+  public void readMsg()
   {
     if (nUpdateRectsLeft == 0) {
 
@@ -97,7 +97,7 @@
     }
   }
 
-  void readFramebufferUpdate() 
+  void readFramebufferUpdate()
   {
     is.skip(1);
     nUpdateRectsLeft = is.readU16();
@@ -107,25 +107,25 @@
   void readSetDesktopName(int x, int y, int w, int h)
   {
     String name = is.readString();
-  
+
     if (x != 0 || y != 0 || w != 0 || h != 0) {
       vlog.error("Ignoring DesktopName rect with non-zero position/size");
     } else {
       handler.setName(name);
     }
-  
+
   }
-  
+
   void readExtendedDesktopSize(int x, int y, int w, int h)
   {
     int screens, i;
     int id, flags;
     int sx, sy, sw, sh;
     ScreenSet layout = new ScreenSet();
-  
+
     screens = is.readU8();
     is.skip(3);
-  
+
     for (i = 0;i < screens;i++) {
       id = is.readU32();
       sx = is.readU16();
@@ -133,10 +133,10 @@
       sw = is.readU16();
       sh = is.readU16();
       flags = is.readU32();
-  
+
       layout.add_screen(new Screen(id, sx, sy, sw, sh, flags));
     }
-  
+
     handler.setExtendedDesktopSize(x, y, w, h, layout);
   }
 
@@ -145,29 +145,29 @@
     int flags;
     int len;
     byte[] data = new byte[64];
-  
+
     is.skip(3);
-  
+
     flags = is.readU32();
-  
+
     len = is.readU8();
     if (len > data.length) {
       System.out.println("Ignoring fence with too large payload\n");
       is.skip(len);
       return;
     }
-  
+
     is.readBytes(data, 0, len);
-    
+
     handler.fence(flags, len, data);
   }
-  
+
   void readEndOfContinuousUpdates()
   {
     handler.endOfContinuousUpdates();
   }
 
-  void readClientRedirect(int x, int y, int w, int h) 
+  void readClientRedirect(int x, int y, int w, int h)
   {
     int port = is.readU16();
     String host = is.readString();
diff --git a/java/com/tigervnc/rfb/CMsgWriter.java b/java/com/tigervnc/rfb/CMsgWriter.java
index 3066531..3b226b1 100644
--- a/java/com/tigervnc/rfb/CMsgWriter.java
+++ b/java/com/tigervnc/rfb/CMsgWriter.java
@@ -1,17 +1,17 @@
 /* Copyright (C) 2002-2005 RealVNC Ltd.  All Rights Reserved.
  * Copyright 2009-2011 Pierre Ossman for Cendio AB
  * Copyright (C) 2011 Brian P. Hinz
- * 
+ *
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this software; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
@@ -26,15 +26,15 @@
 
   abstract public void writeClientInit(boolean shared);
 
-  synchronized public void writeSetPixelFormat(PixelFormat pf) 
+  synchronized public void writeSetPixelFormat(PixelFormat pf)
   {
-    startMsg(MsgTypes.msgTypeSetPixelFormat);                                 
+    startMsg(MsgTypes.msgTypeSetPixelFormat);
     os.pad(3);
     pf.write(os);
     endMsg();
   }
 
-  synchronized public void writeSetEncodings(int nEncodings, int[] encodings) 
+  synchronized public void writeSetEncodings(int nEncodings, int[] encodings)
   {
     startMsg(MsgTypes.msgTypeSetEncodings);
     os.skip(1);
@@ -47,7 +47,7 @@
   // Ask for encodings based on which decoders are supported.  Assumes higher
   // encoding numbers are more desirable.
 
-  synchronized public void writeSetEncodings(int preferredEncoding, boolean useCopyRect) 
+  synchronized public void writeSetEncodings(int preferredEncoding, boolean useCopyRect)
   {
     int nEncodings = 0;
     int[] encodings = new int[Encodings.encodingMax+3];
@@ -65,7 +65,7 @@
     encodings[nEncodings++] = Encodings.pseudoEncodingLastRect;
     encodings[nEncodings++] = Encodings.pseudoEncodingContinuousUpdates;
     encodings[nEncodings++] = Encodings.pseudoEncodingFence;
-    
+
 
     if (Decoder.supported(preferredEncoding)) {
       encodings[nEncodings++] = preferredEncoding;
@@ -115,7 +115,7 @@
     writeSetEncodings(nEncodings, encodings);
   }
 
-  synchronized public void writeFramebufferUpdateRequest(Rect r, boolean incremental) 
+  synchronized public void writeFramebufferUpdateRequest(Rect r, boolean incremental)
   {
     startMsg(MsgTypes.msgTypeFramebufferUpdateRequest);
     os.writeU8(incremental?1:0);
@@ -126,7 +126,7 @@
     endMsg();
   }
 
-  synchronized public void writeKeyEvent(int key, boolean down) 
+  synchronized public void writeKeyEvent(int key, boolean down)
   {
     startMsg(MsgTypes.msgTypeKeyEvent);
     os.writeU8(down?1:0);
@@ -135,7 +135,7 @@
     endMsg();
   }
 
-  synchronized public void writePointerEvent(Point pos, int buttonMask) 
+  synchronized public void writePointerEvent(Point pos, int buttonMask)
   {
     Point p = new Point(pos.x,pos.y);
     if (p.x < 0) p.x = 0;
@@ -150,7 +150,7 @@
     endMsg();
   }
 
-  synchronized public void writeClientCutText(String str, int len) 
+  synchronized public void writeClientCutText(String str, int len)
   {
     startMsg(MsgTypes.msgTypeClientCutText);
     os.pad(3);
diff --git a/java/com/tigervnc/rfb/CMsgWriterV3.java b/java/com/tigervnc/rfb/CMsgWriterV3.java
index a730698..10c377a 100644
--- a/java/com/tigervnc/rfb/CMsgWriterV3.java
+++ b/java/com/tigervnc/rfb/CMsgWriterV3.java
@@ -1,17 +1,17 @@
 /* Copyright (C) 2002-2005 RealVNC Ltd.  All Rights Reserved.
  * Copyright 2009-2011 Pierre Ossman for Cendio AB
  * Copyright (C) 2011 Brian P. Hinz
- * 
+ *
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this software; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
@@ -45,16 +45,16 @@
 	{
 	  if (!cp.supportsSetDesktopSize)
 	    throw new Exception("Server does not support SetDesktopSize");
-	
+
 	  startMsg(MsgTypes.msgTypeSetDesktopSize);
 	  os.pad(1);
-	
+
 	  os.writeU16(width);
 	  os.writeU16(height);
-	
+
 	  os.writeU8(layout.num_screens());
 	  os.pad(1);
-	
+
     for (Iterator<Screen> iter = layout.screens.iterator(); iter.hasNext(); ) {
       Screen refScreen = (Screen)iter.next();
 	    os.writeU32(refScreen.id);
@@ -64,7 +64,7 @@
 	    os.writeU16(refScreen.dimensions.height());
 	    os.writeU32(refScreen.flags);
 	  }
-	
+
 	  endMsg();
 	}
 
@@ -76,33 +76,33 @@
       throw new Exception("Too large fence payload");
     if ((flags & ~fenceTypes.fenceFlagsSupported) != 0)
       throw new Exception("Unknown fence flags");
-  
+
     startMsg(MsgTypes.msgTypeClientFence);
     os.pad(3);
-  
+
     os.writeU32(flags);
-  
+
     os.writeU8(len);
     os.writeBytes(data, 0, len);
-  
+
     endMsg();
   }
-  
+
   synchronized public void writeEnableContinuousUpdates(boolean enable,
                                            int x, int y, int w, int h)
   {
     if (!cp.supportsContinuousUpdates)
       throw new Exception("Server does not support continuous updates");
-  
+
     startMsg(MsgTypes.msgTypeEnableContinuousUpdates);
-  
+
     os.writeU8((enable?1:0));
-  
+
     os.writeU16(x);
     os.writeU16(y);
     os.writeU16(w);
     os.writeU16(h);
-  
+
     endMsg();
   }
 }
diff --git a/java/com/tigervnc/rfb/CSecurity.java b/java/com/tigervnc/rfb/CSecurity.java
index 96d5200..f67680c 100644
--- a/java/com/tigervnc/rfb/CSecurity.java
+++ b/java/com/tigervnc/rfb/CSecurity.java
@@ -1,15 +1,15 @@
 /* Copyright (C) 2002-2005 RealVNC Ltd.  All Rights Reserved.
- * 
+ *
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this software; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
@@ -37,7 +37,7 @@
   abstract public boolean processMsg(CConnection cc);
   abstract public int getType();
   abstract public String description();
-  
+
   /*
    * Use variable directly instead of dumb get/set methods.
    * It MUST be set by viewer.
diff --git a/java/com/tigervnc/rfb/CSecurityIdent.java b/java/com/tigervnc/rfb/CSecurityIdent.java
index 50836b8..9eb6e0b 100644
--- a/java/com/tigervnc/rfb/CSecurityIdent.java
+++ b/java/com/tigervnc/rfb/CSecurityIdent.java
@@ -1,15 +1,15 @@
 /* Copyright (C) 2011 Brian P. Hinz
- * 
+ *
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this software; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
diff --git a/java/com/tigervnc/rfb/CSecurityNone.java b/java/com/tigervnc/rfb/CSecurityNone.java
index d17741f..0475be5 100644
--- a/java/com/tigervnc/rfb/CSecurityNone.java
+++ b/java/com/tigervnc/rfb/CSecurityNone.java
@@ -1,15 +1,15 @@
 /* Copyright (C) 2002-2005 RealVNC Ltd.  All Rights Reserved.
- * 
+ *
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this software; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
diff --git a/java/com/tigervnc/rfb/CSecurityPlain.java b/java/com/tigervnc/rfb/CSecurityPlain.java
index b0504a5..d6f8ffd 100644
--- a/java/com/tigervnc/rfb/CSecurityPlain.java
+++ b/java/com/tigervnc/rfb/CSecurityPlain.java
@@ -1,17 +1,17 @@
 /* Copyright (C) 2005 Martin Koegler
  * Copyright (C) 2010 TigerVNC Team
  * Copyright (C) 2011 Brian P. Hinz
- * 
+ *
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this software; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
@@ -27,7 +27,7 @@
 
   public CSecurityPlain() { }
 
-  public boolean processMsg(CConnection cc) 
+  public boolean processMsg(CConnection cc)
   {
     OutStream os = cc.getOutStream();
 
diff --git a/java/com/tigervnc/rfb/CSecurityStack.java b/java/com/tigervnc/rfb/CSecurityStack.java
index 6cca76b..e4f5988 100644
--- a/java/com/tigervnc/rfb/CSecurityStack.java
+++ b/java/com/tigervnc/rfb/CSecurityStack.java
@@ -2,17 +2,17 @@
  * Copyright (C) 2006 OCCAM Financial Technology
  * Copyright (C) 2010 TigerVNC Team
  * Copyright (C) 2011 Brian P. Hinz
- * 
+ *
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this software; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
@@ -27,35 +27,35 @@
   			       CSecurity s1)
   {
     name = Name;
-    type = Type; 
+    type = Type;
     state = 0;
     state0 = s0;
     state1 = s1;
   }
-  
+
   public boolean processMsg(CConnection cc)
   {
     boolean res = true;
     if (state == 0) {
       if (state0 != null)
         res = state0.processMsg(cc);
-  
+
       if (!res)
         return res;
-  
+
       state++;
     }
-  
+
     if (state == 1) {
       if(state1 != null)
         res = state1.processMsg(cc);
-  
+
       if(!res)
         return res;
-  
+
       state++;
     }
-  
+
     return res;
   }
 
diff --git a/java/com/tigervnc/rfb/CSecurityTLS.java b/java/com/tigervnc/rfb/CSecurityTLS.java
index 4486eef..86a3caf 100644
--- a/java/com/tigervnc/rfb/CSecurityTLS.java
+++ b/java/com/tigervnc/rfb/CSecurityTLS.java
@@ -47,7 +47,7 @@
   = new StringParameter("x509crl",
                         "X509 CRL file", "", Configuration.ConfigurationObject.ConfViewer);
 
-  private void initGlobal() 
+  private void initGlobal()
   {
     boolean globalInitDone = false;
 
@@ -62,14 +62,14 @@
     }
   }
 
-  public CSecurityTLS(boolean _anon) 
+  public CSecurityTLS(boolean _anon)
   {
     anon = _anon;
     session = null;
-    
+
     setDefaults();
-    cafile = x509ca.getData(); 
-    crlfile = x509crl.getData(); 
+    cafile = x509ca.getData();
+    crlfile = x509crl.getData();
   }
 
   public static String getDefaultCA() {
@@ -119,7 +119,7 @@
           reason = new String("Authentication failure (protocol error)");
         throw new AuthFailureException(reason);
       }
-      
+
       setParam();
 
     }
@@ -153,8 +153,8 @@
       }
     } else {
       try {
-        TrustManager[] myTM = new TrustManager[] { 
-          new MyX509TrustManager() 
+        TrustManager[] myTM = new TrustManager[] {
+          new MyX509TrustManager()
         };
         ctx.init (null, myTM, null);
       } catch (java.security.GeneralSecurityException e) {
@@ -223,7 +223,7 @@
           params.setRevocationEnabled(true);
         }
         tmf.init(new CertPathTrustManagerParameters(params));
-      } catch (java.io.FileNotFoundException e) { 
+      } catch (java.io.FileNotFoundException e) {
         vlog.error(e.toString());
       } catch (java.io.IOException e) {
         vlog.error(e.toString());
@@ -231,7 +231,7 @@
       tm = (X509TrustManager)tmf.getTrustManagers()[0];
     }
 
-    public void checkClientTrusted(X509Certificate[] chain, String authType) 
+    public void checkClientTrusted(X509Certificate[] chain, String authType)
       throws CertificateException
     {
       tm.checkClientTrusted(chain, authType);
@@ -264,7 +264,7 @@
   }
 
   public final int getType() { return anon ? Security.secTypeTLSNone : Security.secTypeX509None; }
-  public final String description() 
+  public final String description()
     { return anon ? "TLS Encryption without VncAuth" : "X509 Encryption without VncAuth"; }
 
   //protected void checkSession();
diff --git a/java/com/tigervnc/rfb/CSecurityVeNCrypt.java b/java/com/tigervnc/rfb/CSecurityVeNCrypt.java
index 528158c..f353874 100644
--- a/java/com/tigervnc/rfb/CSecurityVeNCrypt.java
+++ b/java/com/tigervnc/rfb/CSecurityVeNCrypt.java
@@ -28,7 +28,7 @@
 
 public class CSecurityVeNCrypt extends CSecurity {
 
-  public CSecurityVeNCrypt(SecurityClient sec) 
+  public CSecurityVeNCrypt(SecurityClient sec)
   {
     haveRecvdMajorVersion = false;
     haveRecvdMinorVersion = false;
@@ -54,7 +54,7 @@
     if (!haveRecvdMinorVersion) {
       minorVersion = is.readU8();
       haveRecvdMinorVersion = true;
-      
+
       return false;
     }
 
@@ -83,7 +83,7 @@
         os.flush();
 	      throw new Exception("Server reported an unsupported VeNCrypt version");
       }
-    
+
       haveSentVersion = true;
       return false;
     }
@@ -101,7 +101,7 @@
     if (!haveNumberOfTypes) {
       nAvailableTypes = is.readU8();
       iAvailableType = 0;
-  
+
       if (nAvailableTypes <= 0)
 	      throw new Exception("The server reported no VeNCrypt sub-types");
 
diff --git a/java/com/tigervnc/rfb/CSecurityVncAuth.java b/java/com/tigervnc/rfb/CSecurityVncAuth.java
index 87d823f..e053e41 100644
--- a/java/com/tigervnc/rfb/CSecurityVncAuth.java
+++ b/java/com/tigervnc/rfb/CSecurityVncAuth.java
@@ -1,15 +1,15 @@
 /* Copyright (C) 2002-2005 RealVNC Ltd.  All Rights Reserved.
- * 
+ *
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this software; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
@@ -27,7 +27,7 @@
 
   private static final int vncAuthChallengeSize = 16;
 
-  public boolean processMsg(CConnection cc) 
+  public boolean processMsg(CConnection cc)
   {
     InStream is = cc.getInStream();
     OutStream os = cc.getOutStream();
diff --git a/java/com/tigervnc/rfb/Configuration.java b/java/com/tigervnc/rfb/Configuration.java
index fb635c7..5d140d9 100644
--- a/java/com/tigervnc/rfb/Configuration.java
+++ b/java/com/tigervnc/rfb/Configuration.java
@@ -1,17 +1,17 @@
 /* Copyright (C) 2002-2005 RealVNC Ltd.  All Rights Reserved.
  * Copyright 2004-2005 Cendio AB.
  * Copyright 2012 Brian P. Hinz
- * 
+ *
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this software; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
@@ -45,19 +45,19 @@
     if (global_ == null)
       global_ = new Configuration("Global");
     return global_;
-  } 
+  }
 
   public static Configuration server() {
     if (server_ == null)
       server_ = new Configuration("Server");
     return server_;
-  } 
+  }
 
   public static Configuration viewer() {
     if (viewer_ == null)
       viewer_ = new Configuration("Viewer");
     return viewer_;
-  } 
+  }
 
   // Enable server/viewer specific parameters
   public static void enableServerParams() { global().appendConfiguration(server()); }
@@ -124,8 +124,8 @@
           current.getName().equalsIgnoreCase(name.substring(0, len)))
       {
         boolean b = current.setParam(val);
-        current.setHasBeenSet(); 
-        if (b && immutable) 
+        current.setHasBeenSet();
+        if (b && immutable)
   	  current.setImmutable();
         return b;
       }
@@ -150,14 +150,14 @@
       while (current != null) {
         if (current.getName().equalsIgnoreCase(config)) {
           boolean b = current.setParam();
-  	  current.setHasBeenSet(); 
-          if (b && immutable) 
+  	  current.setHasBeenSet();
+          if (b && immutable)
   	    current.setImmutable();
           return b;
         }
         current = current._next;
       }
-    }    
+    }
     return (_next != null) ? _next.set(config, immutable) : false;
   }
 
@@ -174,11 +174,11 @@
     return setParam(param, value, false);
   }
 
-  public static boolean setParam(String config, boolean immutable) { 
+  public static boolean setParam(String config, boolean immutable) {
     return global().set(config, immutable);
   }
 
-  public static boolean setParam(String config) { 
+  public static boolean setParam(String config) {
     return setParam(config, false);
   }
 
@@ -199,7 +199,7 @@
     }
     return (_next != null) ? _next.get(param) : null;
   }
-  
+
   public static VoidParameter getParam(String param) { return global().get(param); }
 
   public static void listParams(int width, int nameWidth) {
@@ -211,7 +211,7 @@
 
   public void list(int width, int nameWidth) {
     VoidParameter current = head;
-  
+
     System.err.format("%s Parameters:%n", name);
     while (current != null) {
       String def_str = current.getDefaultStr();
@@ -226,7 +226,7 @@
         int wordLen;
         if (s > -1) wordLen = s;
         else wordLen = desc.length();
-  
+
         if (column + wordLen + 1 > width) {
           format = "%n%"+(nameWidth+4)+"s";
           System.err.format(format, "");
@@ -239,7 +239,7 @@
         if (s == -1) break;
         desc = desc.substring(wordLen+1);
       }
-  
+
       if (def_str != null) {
         if (column + def_str.length() + 11 > width)
           System.err.format("%n%"+(nameWidth+4)+"s","");
@@ -250,7 +250,7 @@
       }
       current = current._next;
     }
-  
+
     if (_next != null)
       _next.list(width, nameWidth);
   }
diff --git a/java/com/tigervnc/rfb/ConnFailedException.java b/java/com/tigervnc/rfb/ConnFailedException.java
index e3a55bc..7c32914 100644
--- a/java/com/tigervnc/rfb/ConnFailedException.java
+++ b/java/com/tigervnc/rfb/ConnFailedException.java
@@ -1,15 +1,15 @@
 /* Copyright (C) 2002-2005 RealVNC Ltd.  All Rights Reserved.
- * 
+ *
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this software; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
diff --git a/java/com/tigervnc/rfb/ConnParams.java b/java/com/tigervnc/rfb/ConnParams.java
index 058019b..f1f5395 100644
--- a/java/com/tigervnc/rfb/ConnParams.java
+++ b/java/com/tigervnc/rfb/ConnParams.java
@@ -1,17 +1,17 @@
 /* Copyright (C) 2002-2005 RealVNC Ltd.  All Rights Reserved.
  * Copyright (C) 2011 D. R. Commander.  All Rights Reserved.
  * Copyright (C) 2012 Brian P. Hinz
- * 
+ *
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this software; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
@@ -44,7 +44,7 @@
     setName("");
   }
 
-  public boolean readVersion(InStream is) 
+  public boolean readVersion(InStream is)
   {
     done = false;
     if (verStrPos >= 12) return false;
@@ -104,7 +104,7 @@
   }
 
   public String name() { return name_; }
-  public void setName(String name) 
+  public void setName(String name)
   {
     name_ = name;
   }
diff --git a/java/com/tigervnc/rfb/Cursor.java b/java/com/tigervnc/rfb/Cursor.java
index a6b058f..78aa0fb 100644
--- a/java/com/tigervnc/rfb/Cursor.java
+++ b/java/com/tigervnc/rfb/Cursor.java
@@ -1,15 +1,15 @@
 /* Copyright (C) 2002-2005 RealVNC Ltd.  All Rights Reserved.
- * 
+ *
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this software; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
diff --git a/java/com/tigervnc/rfb/Decoder.java b/java/com/tigervnc/rfb/Decoder.java
index 9e37f8e..f0ece0a 100644
--- a/java/com/tigervnc/rfb/Decoder.java
+++ b/java/com/tigervnc/rfb/Decoder.java
@@ -1,15 +1,15 @@
 /* Copyright (C) 2002-2005 RealVNC Ltd.  All Rights Reserved.
- * 
+ *
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this software; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
@@ -22,14 +22,14 @@
 
   abstract public void readRect(Rect r, CMsgHandler handler);
 
-  static public boolean supported(int encoding) 
+  static public boolean supported(int encoding)
   {
 /*
     return encoding <= Encodings.encodingMax && createFns[encoding];
 */
-    return (encoding == Encodings.encodingRaw || 
+    return (encoding == Encodings.encodingRaw ||
             encoding == Encodings.encodingRRE ||
-            encoding == Encodings.encodingHextile || 
+            encoding == Encodings.encodingHextile ||
             encoding == Encodings.encodingTight ||
             encoding == Encodings.encodingZRLE);
   }
diff --git a/java/com/tigervnc/rfb/DesCipher.java b/java/com/tigervnc/rfb/DesCipher.java
index f7ae9db..ac66406 100644
--- a/java/com/tigervnc/rfb/DesCipher.java
+++ b/java/com/tigervnc/rfb/DesCipher.java
@@ -20,16 +20,16 @@
 //
 // Permission to use, copy, modify, and distribute this software
 // and its documentation for NON-COMMERCIAL or COMMERCIAL purposes and
-// without fee is hereby granted, provided that this copyright notice is kept 
-// intact. 
-// 
+// without fee is hereby granted, provided that this copyright notice is kept
+// intact.
+//
 // WIDGET WORKSHOP MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY
 // OF THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
 // TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
 // PARTICULAR PURPOSE, OR NON-INFRINGEMENT. WIDGET WORKSHOP SHALL NOT BE LIABLE
 // FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
 // DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES.
-// 
+//
 // THIS SOFTWARE IS NOT DESIGNED OR INTENDED FOR USE OR RESALE AS ON-LINE
 // CONTROL EQUIPMENT IN HAZARDOUS ENVIRONMENTS REQUIRING FAIL-SAFE
 // PERFORMANCE, SUCH AS IN THE OPERATION OF NUCLEAR FACILITIES, AIRCRAFT
@@ -475,7 +475,7 @@
     public static void squashBytesToInts( byte[] inBytes, int inOff, int[] outInts, int outOff, int intLen )
         {
 	for ( int i = 0; i < intLen; ++i )
-	    outInts[outOff + i] = 
+	    outInts[outOff + i] =
 		( ( inBytes[inOff + i * 4    ] & 0xff ) << 24 ) |
 		( ( inBytes[inOff + i * 4 + 1] & 0xff ) << 16 ) |
 		( ( inBytes[inOff + i * 4 + 2] & 0xff ) <<  8 ) |
diff --git a/java/com/tigervnc/rfb/Encoder.java b/java/com/tigervnc/rfb/Encoder.java
index bfb03f5..5b4eb0c 100644
--- a/java/com/tigervnc/rfb/Encoder.java
+++ b/java/com/tigervnc/rfb/Encoder.java
@@ -1,15 +1,15 @@
 /* Copyright (C) 2002-2005 RealVNC Ltd.  All Rights Reserved.
- * 
+ *
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this software; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
diff --git a/java/com/tigervnc/rfb/Encodings.java b/java/com/tigervnc/rfb/Encodings.java
index fdb6881..ec2331e 100644
--- a/java/com/tigervnc/rfb/Encodings.java
+++ b/java/com/tigervnc/rfb/Encodings.java
@@ -1,17 +1,17 @@
 /* Copyright (C) 2002-2005 RealVNC Ltd.  All Rights Reserved.
  * Copyright (C) 2011 D. R. Commander.  All Rights Reserved.
  * Copyright (C) 2012 Brian P. Hinz
- * 
+ *
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this software; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
diff --git a/java/com/tigervnc/rfb/Exception.java b/java/com/tigervnc/rfb/Exception.java
index ef7fa81..5b879a2 100644
--- a/java/com/tigervnc/rfb/Exception.java
+++ b/java/com/tigervnc/rfb/Exception.java
@@ -1,15 +1,15 @@
 /* Copyright (C) 2002-2005 RealVNC Ltd.  All Rights Reserved.
- * 
+ *
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this software; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
diff --git a/java/com/tigervnc/rfb/Hextile.java b/java/com/tigervnc/rfb/Hextile.java
index 0b8c8c6..99ed0b3 100644
--- a/java/com/tigervnc/rfb/Hextile.java
+++ b/java/com/tigervnc/rfb/Hextile.java
@@ -1,15 +1,15 @@
 /* Copyright (C) 2002-2005 RealVNC Ltd.  All Rights Reserved.
- * 
+ *
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this software; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
diff --git a/java/com/tigervnc/rfb/HextileDecoder.java b/java/com/tigervnc/rfb/HextileDecoder.java
index 0f2b490..94e91f7 100644
--- a/java/com/tigervnc/rfb/HextileDecoder.java
+++ b/java/com/tigervnc/rfb/HextileDecoder.java
@@ -1,15 +1,15 @@
 /* Copyright (C) 2002-2005 RealVNC Ltd.  All Rights Reserved.
- * 
+ *
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this software; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
diff --git a/java/com/tigervnc/rfb/Hostname.java b/java/com/tigervnc/rfb/Hostname.java
index 2e64d03..c7e5659 100644
--- a/java/com/tigervnc/rfb/Hostname.java
+++ b/java/com/tigervnc/rfb/Hostname.java
@@ -1,15 +1,15 @@
 /* Copyright (C) 2002-2005 RealVNC Ltd.  All Rights Reserved.
- * 
+ *
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this software; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
diff --git a/java/com/tigervnc/rfb/IntParameter.java b/java/com/tigervnc/rfb/IntParameter.java
index d949710..dcad04a 100644
--- a/java/com/tigervnc/rfb/IntParameter.java
+++ b/java/com/tigervnc/rfb/IntParameter.java
@@ -1,17 +1,17 @@
 /* Copyright (C) 2002-2005 RealVNC Ltd.  All Rights Reserved.
  * Copyright 2004-2005 Cendio AB.
  * Copyright 2012 Brian P. Hinz
- * 
+ *
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this software; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
@@ -22,7 +22,7 @@
 
 public class IntParameter extends VoidParameter {
   public IntParameter(String name_, String desc_, int v,
-                      int minValue_, int maxValue_, 
+                      int minValue_, int maxValue_,
                       Configuration.ConfigurationObject co)
   {
     super(name_, desc_, co);
@@ -32,7 +32,7 @@
     maxValue = maxValue_;
   }
 
-  public IntParameter(String name_, String desc_, int v) 
+  public IntParameter(String name_, String desc_, int v)
   {
     this(name_, desc_, v, Integer.MIN_VALUE, Integer.MAX_VALUE,
          Configuration.ConfigurationObject.ConfGlobal);
diff --git a/java/com/tigervnc/rfb/JpegCompressor.java b/java/com/tigervnc/rfb/JpegCompressor.java
index 626983b..1e1abd3 100644
--- a/java/com/tigervnc/rfb/JpegCompressor.java
+++ b/java/com/tigervnc/rfb/JpegCompressor.java
@@ -1,17 +1,17 @@
 /* Copyright (C) 2002-2005 RealVNC Ltd.  All Rights Reserved.
  * Copyright (C) 2011 D. R. Commander.  All Rights Reserved.
  * Copyright (C) 2012 Brian P. Hinz
- * 
+ *
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this software; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
@@ -20,13 +20,13 @@
 package com.tigervnc.rfb;
 
 public class JpegCompressor {
-  
+
   public static final int SUBSAMP_UNDEFINED = -1;
   public static final int SUBSAMP_NONE = 0;
   public static final int SUBSAMP_420 = 1;
   public static final int SUBSAMP_422 = 2;
   public static final int SUBSAMP_GRAY = 3;
-  
+
   public static int subsamplingNum(String name) {
     if (name.equalsIgnoreCase("SUBSAMP_UNDEFINED")) return SUBSAMP_UNDEFINED;
     if (name.equalsIgnoreCase("SUBSAMP_NONE"))      return SUBSAMP_NONE;
diff --git a/java/com/tigervnc/rfb/LogWriter.java b/java/com/tigervnc/rfb/LogWriter.java
index fc9478c..ca7d06a 100644
--- a/java/com/tigervnc/rfb/LogWriter.java
+++ b/java/com/tigervnc/rfb/LogWriter.java
@@ -1,15 +1,15 @@
 /* Copyright (C) 2002-2005 RealVNC Ltd.  All Rights Reserved.
- * 
+ *
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this software; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
diff --git a/java/com/tigervnc/rfb/ManagedPixelBuffer.java b/java/com/tigervnc/rfb/ManagedPixelBuffer.java
index a4d5943..f947af7 100644
--- a/java/com/tigervnc/rfb/ManagedPixelBuffer.java
+++ b/java/com/tigervnc/rfb/ManagedPixelBuffer.java
@@ -1,15 +1,15 @@
 /* Copyright (C) 2002-2005 RealVNC Ltd.  All Rights Reserved.
- * 
+ *
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this software; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
diff --git a/java/com/tigervnc/rfb/MsgTypes.java b/java/com/tigervnc/rfb/MsgTypes.java
index a793f1e..c12f38d 100644
--- a/java/com/tigervnc/rfb/MsgTypes.java
+++ b/java/com/tigervnc/rfb/MsgTypes.java
@@ -1,16 +1,16 @@
 /* Copyright (C) 2002-2005 RealVNC Ltd.  All Rights Reserved.
  * Copyright (C) 2011 Brian P. Hinz
- * 
+ *
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this software; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
diff --git a/java/com/tigervnc/rfb/PixelBuffer.java b/java/com/tigervnc/rfb/PixelBuffer.java
index 29d607e..a46667d 100644
--- a/java/com/tigervnc/rfb/PixelBuffer.java
+++ b/java/com/tigervnc/rfb/PixelBuffer.java
@@ -1,15 +1,15 @@
 /* Copyright (C) 2002-2005 RealVNC Ltd.  All Rights Reserved.
- * 
+ *
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this software; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
@@ -36,11 +36,11 @@
       throw new Exception("Internal error: bpp must be 8, 16, or 32 in PixelBuffer ("+pf.bpp+")");
     format = pf;
     switch (pf.depth) {
-    case  3: 
+    case  3:
       // Fall-through to depth 8
-    case  6: 
+    case  6:
       // Fall-through to depth 8
-    case  8: 
+    case  8:
       if (!pf.trueColour) {
         if (cm == null)
           cm = new IndexColorModel(8, 256, new byte[256], new byte[256], new byte[256]);
@@ -51,14 +51,14 @@
       int bmask = pf.blueMax << pf.blueShift;
       cm = new DirectColorModel(8, rmask, gmask, bmask);
       break;
-    case 16: 
+    case 16:
       cm = new DirectColorModel(32, 0xF800, 0x07C0, 0x003E);
       break;
-    case 24: 
+    case 24:
       cm = new DirectColorModel(32, (0xff << 16), (0xff << 8), 0xff);
       break;
-    case 32: 
-      cm = new DirectColorModel(32, (0xff << pf.redShift), 
+    case 32:
+      cm = new DirectColorModel(32, (0xff << pf.redShift),
         (0xff << pf.greenShift), (0xff << pf.blueShift));
       break;
     default:
@@ -103,10 +103,10 @@
 
   public void maskRect(int x, int y, int w, int h, int[] pix, byte[] mask) {
     int maskBytesPerRow = (w + 7) / 8;
-    
+
     for (int j = 0; j < h; j++) {
       int cy = y + j;
-      
+
       if (cy < 0 || cy >= height_)
         continue;
 
@@ -121,7 +121,7 @@
 
         if ((mask[byte_] & (1 << bit)) != 0)
          data[cy * width_ + cx] = pix[j * w + i];
-      }     
+      }
     }
   }
 
diff --git a/java/com/tigervnc/rfb/PixelFormat.java b/java/com/tigervnc/rfb/PixelFormat.java
index 1e12c4c..c4d6870 100644
--- a/java/com/tigervnc/rfb/PixelFormat.java
+++ b/java/com/tigervnc/rfb/PixelFormat.java
@@ -2,17 +2,17 @@
  * Copyright 2009 Pierre Ossman for Cendio AB
  * Copyright (C) 2011 D. R. Commander.  All Rights Reserved.
  * Copyright (C) 2011 Brian P. Hinz
- * 
+ *
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this software; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
@@ -106,7 +106,7 @@
     return true;
   }
 
-  public int pixelFromRGB(int red, int green, int blue, ColorModel cm) 
+  public int pixelFromRGB(int red, int green, int blue, ColorModel cm)
   {
     if (trueColour) {
       int r = (red   * redMax     + 32767) / 65535;
@@ -139,7 +139,7 @@
     return 0;
   }
 
-  public void bufferFromRGB(int[] dst, int dstPtr, byte[] src, 
+  public void bufferFromRGB(int[] dst, int dstPtr, byte[] src,
                             int srcPtr, int pixels) {
     if (is888()) {
       // Optimised common case
@@ -162,7 +162,7 @@
       // Generic code
       int p, r, g, b;
       int[] rgb = new int[4];
-      
+
       int i = srcPtr; int j = dstPtr;
       while (i < pixels) {
         r = src[i++] & 0xff;
@@ -182,11 +182,11 @@
   {
     int p;
     byte r, g, b;
-  
+
     for (int i=0; i < pixels; i++) {
-      p = pixelFromBuffer(src, srcPtr); 
+      p = pixelFromBuffer(src, srcPtr);
       srcPtr += bpp/8;
-  
+
       dst[dstPtr++] = (byte)cm.getRed(p);
       dst[dstPtr++] = (byte)cm.getGreen(p);
       dst[dstPtr++] = (byte)cm.getBlue(p);
@@ -196,9 +196,9 @@
   public int pixelFromBuffer(byte[] buffer, int bufferPtr)
   {
     int p;
-  
+
     p = 0;
-  
+
     if (bigEndian) {
       switch (bpp) {
       case 32:
@@ -221,7 +221,7 @@
         }
       }
     }
-  
+
     return p;
   }
 
@@ -289,7 +289,7 @@
       }
     }
   }
-          
+
 
   public int bpp;
   public int depth;
diff --git a/java/com/tigervnc/rfb/Point.java b/java/com/tigervnc/rfb/Point.java
index 3a5f3e9..74c8e11 100644
--- a/java/com/tigervnc/rfb/Point.java
+++ b/java/com/tigervnc/rfb/Point.java
@@ -1,16 +1,16 @@
 /* Copyright (C) 2002-2005 RealVNC Ltd.  All Rights Reserved.
  * Copyright (C) 2011 Brian P. Hinz
- * 
+ *
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this software; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
diff --git a/java/com/tigervnc/rfb/RREDecoder.java b/java/com/tigervnc/rfb/RREDecoder.java
index 97cb7ed..cf74bf5 100644
--- a/java/com/tigervnc/rfb/RREDecoder.java
+++ b/java/com/tigervnc/rfb/RREDecoder.java
@@ -1,15 +1,15 @@
 /* Copyright (C) 2002-2005 RealVNC Ltd.  All Rights Reserved.
- * 
+ *
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this software; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
diff --git a/java/com/tigervnc/rfb/RawDecoder.java b/java/com/tigervnc/rfb/RawDecoder.java
index 22ea30b..b2219a2 100644
--- a/java/com/tigervnc/rfb/RawDecoder.java
+++ b/java/com/tigervnc/rfb/RawDecoder.java
@@ -1,15 +1,15 @@
 /* Copyright (C) 2002-2005 RealVNC Ltd.  All Rights Reserved.
- * 
+ *
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this software; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
diff --git a/java/com/tigervnc/rfb/Rect.java b/java/com/tigervnc/rfb/Rect.java
index 67ece1d..0914f2f 100644
--- a/java/com/tigervnc/rfb/Rect.java
+++ b/java/com/tigervnc/rfb/Rect.java
@@ -1,16 +1,16 @@
 /* Copyright (C) 2002-2005 RealVNC Ltd.  All Rights Reserved.
  * Copyright (C) 2011 Brian P. Hinz
- * 
+ *
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this software; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
@@ -36,12 +36,12 @@
     tl=new Point(0,0);
     br=new Point(0,0);
   }
-  public Rect(Point tl_, Point br_) { 
+  public Rect(Point tl_, Point br_) {
     tl=new Point(tl_.x, tl_.y);
     br=new Point(br_.x,br_.y);
   }
   public Rect(int x1, int y1, int x2, int y2) {
-    tl=new Point(x1, y1); 
+    tl=new Point(x1, y1);
     br=new Point(x2, y2);
   }
   public final void setXYWH(int x, int y, int w, int h) {
diff --git a/java/com/tigervnc/rfb/Screen.java b/java/com/tigervnc/rfb/Screen.java
index a7b094f..c9ab98a 100644
--- a/java/com/tigervnc/rfb/Screen.java
+++ b/java/com/tigervnc/rfb/Screen.java
@@ -1,16 +1,16 @@
 /* Copyright 2009 Pierre Ossman for Cendio AB
  * Copyright (C) 2011 Brian P. Hinz
- * 
+ *
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this software; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
diff --git a/java/com/tigervnc/rfb/ScreenSet.java b/java/com/tigervnc/rfb/ScreenSet.java
index d20374f..a14f561 100644
--- a/java/com/tigervnc/rfb/ScreenSet.java
+++ b/java/com/tigervnc/rfb/ScreenSet.java
@@ -1,15 +1,15 @@
 /* Copyright 2009 Pierre Ossman for Cendio AB
- * 
+ *
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this software; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
@@ -34,7 +34,7 @@
   public final int num_screens() { return screens.size(); }
 
   public final void add_screen(Screen screen) { screens.add(screen); }
-  public final void remove_screen(int id) { 
+  public final void remove_screen(int id) {
     for (Iterator<Screen> iter = screens.iterator(); iter.hasNext(); ) {
       Screen refScreen = (Screen)iter.next();
       if (refScreen.id == id)
diff --git a/java/com/tigervnc/rfb/Security.java b/java/com/tigervnc/rfb/Security.java
index 9df4995..d841c63 100644
--- a/java/com/tigervnc/rfb/Security.java
+++ b/java/com/tigervnc/rfb/Security.java
@@ -1,17 +1,17 @@
 /* Copyright (C) 2002-2005 RealVNC Ltd.  All Rights Reserved.
  * Copyright (C) 2010 TigerVNC Team
  * Copyright (C) 2011 Brian P. Hinz
- * 
+ *
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this software; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
@@ -82,7 +82,7 @@
       if (refType < 0x100)
         result.add(refType);
     }
-    
+
     return (result);
   }
 
@@ -112,13 +112,13 @@
   public boolean IsSupported(int secType)
   {
     Iterator<Integer> i;
-  
+
     for (i = enabledSecTypes.iterator(); i.hasNext(); )
      if ((Integer)i.next() == secType)
        return true;
     if (secType == secTypeVeNCrypt)
      return true;
-  
+
     return false;
   }
 
diff --git a/java/com/tigervnc/rfb/SecurityClient.java b/java/com/tigervnc/rfb/SecurityClient.java
index 3fb919a..59499b1 100644
--- a/java/com/tigervnc/rfb/SecurityClient.java
+++ b/java/com/tigervnc/rfb/SecurityClient.java
@@ -1,17 +1,17 @@
 /* Copyright (C) 2002-2005 RealVNC Ltd.  All Rights Reserved.
  * Copyright (C) 2010 TigerVNC Team
  * Copyright (C) 2011-2012 Brian P. Hinz
- * 
+ *
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this software; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
@@ -30,10 +30,10 @@
   {
     assert (CConn.upg != null); /* (upg == null) means bug in the viewer */
     assert (msg != null);
-  
+
     if (!IsSupported(secType))
       throw new Exception("Security type not supported");
-  
+
     switch (secType) {
     case Security.secTypeNone: return (new CSecurityNone());
     case Security.secTypeVncAuth: return (new CSecurityVncAuth());
@@ -67,7 +67,7 @@
     default:
       throw new Exception("Security type not supported");
     }
-  
+
   }
 
   public static void setDefaults()
@@ -78,7 +78,7 @@
   //UserPasswdGetter upg = null;
   String msg = null;
 
-  static StringParameter secTypes 
+  static StringParameter secTypes
   = new StringParameter("SecurityTypes",
                         "Specify which security scheme to use (None, VncAuth)",
                         "Ident,TLSIdent,X509Ident,X509Plain,TLSPlain,X509Vnc,TLSVnc,X509None,TLSNone,VncAuth,None", Configuration.ConfigurationObject.ConfViewer);
diff --git a/java/com/tigervnc/rfb/StringParameter.java b/java/com/tigervnc/rfb/StringParameter.java
index 4805038..001e914 100644
--- a/java/com/tigervnc/rfb/StringParameter.java
+++ b/java/com/tigervnc/rfb/StringParameter.java
@@ -1,17 +1,17 @@
 /* Copyright (C) 2002-2005 RealVNC Ltd.  All Rights Reserved.
  * Copyright 2004-2005 Cendio AB.
  * Copyright 2012 Brian P. Hinz
- * 
+ *
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this software; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
@@ -21,15 +21,15 @@
 package com.tigervnc.rfb;
 
 public class StringParameter extends VoidParameter {
-  public StringParameter(String name_, String desc_, String v, 
-                         Configuration.ConfigurationObject co) 
+  public StringParameter(String name_, String desc_, String v,
+                         Configuration.ConfigurationObject co)
   {
     super(name_, desc_, co);
     value = v;
     defValue = v;
   }
 
-  public StringParameter(String name_, String desc_, String v) 
+  public StringParameter(String name_, String desc_, String v)
   {
     this(name_, desc_, v, Configuration.ConfigurationObject.ConfGlobal);
   }
diff --git a/java/com/tigervnc/rfb/TightDecoder.java b/java/com/tigervnc/rfb/TightDecoder.java
index d592b36..b644cdb 100644
--- a/java/com/tigervnc/rfb/TightDecoder.java
+++ b/java/com/tigervnc/rfb/TightDecoder.java
@@ -2,17 +2,17 @@
  * Copyright 2004-2005 Cendio AB.
  * Copyright (C) 2011 D. R. Commander.  All Rights Reserved.
  * Copyright (C) 2011-2012 Brian P. Hinz
- *    
+ *
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this software; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
@@ -46,14 +46,14 @@
 
   final static Toolkit tk = Toolkit.getDefaultToolkit();
 
-  public TightDecoder(CMsgReader reader_) { 
-    reader = reader_; 
+  public TightDecoder(CMsgReader reader_) {
+    reader = reader_;
     zis = new ZlibInStream[4];
     for (int i = 0; i < 4; i++)
       zis[i] = new ZlibInStream();
   }
 
-  public void readRect(Rect r, CMsgHandler handler) 
+  public void readRect(Rect r, CMsgHandler handler)
   {
     InStream is = reader.getInStream();
     boolean cutZeros = false;
@@ -198,7 +198,7 @@
     } else {
       // Indexed color
       int x, h = r.height(), w = r.width(), b, pad = stride - w;
-      int ptr = 0; 
+      int ptr = 0;
       int srcPtr = 0, bits;
       if (palSize <= 2) {
         // 2-color palette
@@ -229,7 +229,7 @@
           h--;
         }
       }
-    } 
+    }
 
     handler.imageRect(r, buf);
 
@@ -238,7 +238,7 @@
     }
   }
 
-  final private void DECOMPRESS_JPEG_RECT(Rect r, InStream is, CMsgHandler handler) 
+  final private void DECOMPRESS_JPEG_RECT(Rect r, InStream is, CMsgHandler handler)
   {
     // Read length
     int compressedLen = is.readCompactLength();
@@ -256,7 +256,7 @@
     jpeg.flush();
   }
 
-  final private void FilterGradient24(byte[] netbuf, int[] buf, int stride, 
+  final private void FilterGradient24(byte[] netbuf, int[] buf, int stride,
                                       Rect r)
   {
 
@@ -297,7 +297,7 @@
     }
   }
 
-  final private void FilterGradient(byte[] netbuf, int[] buf, int stride, 
+  final private void FilterGradient(byte[] netbuf, int[] buf, int stride,
                                     Rect r)
   {
 
@@ -321,7 +321,7 @@
       System.arraycopy(pix, 0, thisRow, 0, pix.length);
 
       serverpf.bufferFromRGB(buf, y*stride, pix, 0, 1);
-      
+
       /* Remaining pixels of a row */
       for (x = 1; x < rectWidth; x++) {
         for (c = 0; c < 3; c++) {
diff --git a/java/com/tigervnc/rfb/UnicodeToKeysym.java b/java/com/tigervnc/rfb/UnicodeToKeysym.java
index fdbfd0f..576a2a9 100644
--- a/java/com/tigervnc/rfb/UnicodeToKeysym.java
+++ b/java/com/tigervnc/rfb/UnicodeToKeysym.java
@@ -1,15 +1,15 @@
 /* Copyright (C) 2002-2005 RealVNC Ltd.  All Rights Reserved.
- * 
+ *
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this software; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
diff --git a/java/com/tigervnc/rfb/UserMsgBox.java b/java/com/tigervnc/rfb/UserMsgBox.java
index 4b53c9b..7b184c6 100644
--- a/java/com/tigervnc/rfb/UserMsgBox.java
+++ b/java/com/tigervnc/rfb/UserMsgBox.java
@@ -1,15 +1,15 @@
 /* Copyright (C) 2002-2005 RealVNC Ltd.  All Rights Reserved.
- * 
+ *
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this software; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
diff --git a/java/com/tigervnc/rfb/UserPasswdGetter.java b/java/com/tigervnc/rfb/UserPasswdGetter.java
index 6183d36..feb05ed 100644
--- a/java/com/tigervnc/rfb/UserPasswdGetter.java
+++ b/java/com/tigervnc/rfb/UserPasswdGetter.java
@@ -1,15 +1,15 @@
 /* Copyright (C) 2002-2005 RealVNC Ltd.  All Rights Reserved.
- * 
+ *
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this software; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
diff --git a/java/com/tigervnc/rfb/VncAuth.java b/java/com/tigervnc/rfb/VncAuth.java
index f3d6072..e9ae672 100644
--- a/java/com/tigervnc/rfb/VncAuth.java
+++ b/java/com/tigervnc/rfb/VncAuth.java
@@ -1,15 +1,15 @@
 /* Copyright (C) 2002-2005 RealVNC Ltd.  All Rights Reserved.
- * 
+ *
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this software; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
diff --git a/java/com/tigervnc/rfb/VoidParameter.java b/java/com/tigervnc/rfb/VoidParameter.java
index 33c8bcb..2af0a81 100644
--- a/java/com/tigervnc/rfb/VoidParameter.java
+++ b/java/com/tigervnc/rfb/VoidParameter.java
@@ -1,17 +1,17 @@
 /* Copyright (C) 2002-2005 RealVNC Ltd.  All Rights Reserved.
  * Copyright 2004-2005 Cendio AB.
  * Copyright 2012 Brian P. Hinz
- * 
+ *
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this software; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
@@ -21,8 +21,8 @@
 package com.tigervnc.rfb;
 
 abstract public class VoidParameter {
-  public VoidParameter(String name_, String desc_, 
-                       Configuration.ConfigurationObject co) 
+  public VoidParameter(String name_, String desc_,
+                       Configuration.ConfigurationObject co)
   {
     immutable = false; _hasBeenSet = false; name = name_; description = desc_;
 
@@ -47,11 +47,11 @@
     this(name_, desc_, Configuration.ConfigurationObject.ConfGlobal);
   }
 
-  final public String getName() { 
+  final public String getName() {
     return name;
   }
 
-  final public String getDescription() { 
+  final public String getDescription() {
     return description;
   }
 
diff --git a/java/com/tigervnc/rfb/ZRLEDecoder.java b/java/com/tigervnc/rfb/ZRLEDecoder.java
index bb4d7a6..e706510 100644
--- a/java/com/tigervnc/rfb/ZRLEDecoder.java
+++ b/java/com/tigervnc/rfb/ZRLEDecoder.java
@@ -1,15 +1,15 @@
 /* Copyright (C) 2002-2005 RealVNC Ltd.  All Rights Reserved.
- * 
+ *
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this software; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
@@ -52,7 +52,7 @@
         int[] palette = new int[128];
 
         zis.readPixels(palette, palSize, bytesPerPixel, bigEndian);
-        
+
         if (palSize == 1) {
           int pix = palette[0];
           handler.fillRect(t, pix);
diff --git a/java/com/tigervnc/rfb/fenceTypes.java b/java/com/tigervnc/rfb/fenceTypes.java
index 3486d0e..de2a709 100644
--- a/java/com/tigervnc/rfb/fenceTypes.java
+++ b/java/com/tigervnc/rfb/fenceTypes.java
@@ -1,16 +1,16 @@
 /* Copyright 2011 Pierre Ossman for Cendio AB
  * Copyright (C) 2012 Brian P. Hinz
- * 
+ *
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this software; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
diff --git a/java/com/tigervnc/rfb/screenTypes.java b/java/com/tigervnc/rfb/screenTypes.java
index 9f69932..36b9603 100644
--- a/java/com/tigervnc/rfb/screenTypes.java
+++ b/java/com/tigervnc/rfb/screenTypes.java
@@ -1,16 +1,16 @@
 /* Copyright 2009 Pierre Ossman for Cendio AB
  * Copyright (C) 2011 Brian P. Hinz
- * 
+ *
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this software; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,