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,
