536
|
1 package jp.ac.u_ryukyu.treevnc.test;
|
|
2
|
|
3
|
|
4 import com.glavsoft.rfb.encoding.decoder.ZRLEDecoder;
|
|
5
|
|
6 import java.io.IOException;
|
|
7 import java.nio.ByteBuffer;
|
|
8 import java.util.zip.Deflater;
|
|
9
|
|
10 public class ZlibTest {
|
|
11 private ZRLEDecoder zrleDecoder;
|
|
12 private Deflater deflater;
|
|
13
|
|
14 public void zlibTest() throws IOException {
|
|
15 deflater = new Deflater();
|
|
16 ByteBuffer input = ByteBuffer.allocate(64 * 1024);
|
538
|
17 ByteBuffer output ;
|
536
|
18 while (System.in.available() > 0) {
|
|
19 int length = System.in.read(input.array(), input.position(), input.remaining());
|
|
20 input.position(input.position() + length);
|
|
21
|
|
22 }
|
|
23 }
|
|
24
|
|
25
|
|
26 public static void main(String args[]) throws IOException {
|
|
27 new ZlibTest().zlibTest();
|
|
28 }
|
|
29 }
|