Mercurial > hg > Members > riono > TreeVNC_ja_comment
comparison src/main/java/com/glavsoft/rfb/encoding/decoder/ZlibDecoder.java @ 381:47c018aed50e
Change condition to ZRLEESender.decode method
author | innparusu |
---|---|
date | Thu, 03 Sep 2015 19:44:39 +0900 |
parents | 1d4d5055a288 |
children |
comparison
equal
deleted
inserted
replaced
380:aef5cbdd84ab | 381:47c018aed50e |
---|---|
53 protected byte[] unzip(Reader reader, int zippedLength, int length,EncodingType encodingType) | 53 protected byte[] unzip(Reader reader, int zippedLength, int length,EncodingType encodingType) |
54 throws TransportException { | 54 throws TransportException { |
55 byte [] bytes = ByteBuffer.getInstance().getBuffer(zippedLength + length); | 55 byte [] bytes = ByteBuffer.getInstance().getBuffer(zippedLength + length); |
56 reader.readBytes(bytes, 0, zippedLength); | 56 reader.readBytes(bytes, 0, zippedLength); |
57 if (null == decoder || encodingType == EncodingType.ZRLEE) { | 57 if (null == decoder || encodingType == EncodingType.ZRLEE) { |
58 //if (null == decoder) { | 58 decoder = new Inflater(); |
59 decoder = new Inflater(); | |
60 } | 59 } |
61 decoder.setInput(bytes, 0, zippedLength); | 60 decoder.setInput(bytes, 0, zippedLength); |
62 try { | 61 try { |
63 decoder.inflate(bytes, zippedLength, length); | 62 decoder.inflate(bytes, zippedLength, length); |
64 } catch (DataFormatException e) { | 63 } catch (DataFormatException e) { |