# HG changeset patch # User oc # Date 1422508619 -32400 # Node ID d01d56038dd1a1e28bdbed2c60b6faef048e8bca # Parent 3c63bc88383e0e8a197a32d76fe62e9642683ef4 try catch unzip inflate error. diff -r 3c63bc88383e -r d01d56038dd1 src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java --- a/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java Thu Jan 29 13:29:02 2015 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java Thu Jan 29 14:16:59 2015 +0900 @@ -603,8 +603,7 @@ * @throws IOException */ public int unzip(Inflater inflater, LinkedList inputs, - int inputIndex, byte[] bytes, int bufSize) - throws DataFormatException { + int inputIndex, byte[] bytes, int bufSize) { int position = 0; int limit = bytes.length; while (inputIndex < inputs.size()) { @@ -614,13 +613,15 @@ // we need this // inflater.end(); but this won't work do { - int len0 = inflater.inflate(bytes, position, - limit-position); - if (len0 > 0) { - position += len0; - if (position > limit) { - throw new DataFormatException(); + int len0; + try { + len0 = inflater.inflate(bytes, position, limit-position); + if (len0 > 0) { + position += len0; + if (position > limit) throw new DataFormatException(); } + } catch (DataFormatException e) { + e.printStackTrace(); } } while (!inflater.needsInput()); } @@ -687,8 +688,6 @@ } else { multicastqueue.put(bufs); } - } catch (DataFormatException e) { - throw new TransportException(e); } catch (IOException e) { throw new TransportException(e); } diff -r 3c63bc88383e -r d01d56038dd1 src/viewer_swing/java/com/glavsoft/viewer/swing/Surface.java --- a/src/viewer_swing/java/com/glavsoft/viewer/swing/Surface.java Thu Jan 29 13:29:02 2015 +0900 +++ b/src/viewer_swing/java/com/glavsoft/viewer/swing/Surface.java Thu Jan 29 14:16:59 2015 +0900 @@ -135,7 +135,7 @@ public void paintComponent(Graphics g) { if (null == renderer) return; ((Graphics2D)g).scale(scaleFactor, scaleFactor); - ((Graphics2D) g).setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_SPEED); + ((Graphics2D) g).setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY); synchronized (renderer.getLock()) { Image offscreenImage = renderer.getOffscreenImage(); if (offscreenImage != null) {