changeset 549:e68154211286

debug
author e165729 <e165729@ie.u-ryukyu.ac.jp>
date Sat, 04 Jan 2020 17:34:01 +0900
parents 673f0e672a02
children 9c0cbe119155
files TreeVNC.iml build.gradle src/main/java/com/glavsoft/rfb/encoding/decoder/ZlibDecoder.java
diffstat 3 files changed, 16 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/TreeVNC.iml	Tue Dec 24 19:14:43 2019 +0900
+++ b/TreeVNC.iml	Sat Jan 04 17:34:01 2020 +0900
@@ -1,12 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <module external.system.id="GRADLE" type="JAVA_MODULE" version="4">
-  <component name="FacetManager">
-    <facet type="android-gradle" name="Android-Gradle">
-      <configuration>
-        <option name="GRADLE_PROJECT_PATH" value=":" />
-      </configuration>
-    </facet>
-  </component>
   <component name="NewModuleRootManager" inherit-compiler-output="true">
     <exclude-output />
     <content url="file://$MODULE_DIR$">
--- a/build.gradle	Tue Dec 24 19:14:43 2019 +0900
+++ b/build.gradle	Sat Jan 04 17:34:01 2020 +0900
@@ -152,10 +152,10 @@
 mainClassName = 'com.glavsoft.viewer.TreeViewer'
 applicationName = 'TreeVNC'
 
-allprojects {
-    gradle.projectsEvaluated {
-        tasks.withType(JavaCompile) {
-            options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
-        }
-    }
-}
\ No newline at end of file
+//allprojects {
+//    gradle.projectsEvaluated {
+//        tasks.withType(JavaCompile) {
+//            options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
+//        }
+//    }
+//}
\ No newline at end of file
--- a/src/main/java/com/glavsoft/rfb/encoding/decoder/ZlibDecoder.java	Tue Dec 24 19:14:43 2019 +0900
+++ b/src/main/java/com/glavsoft/rfb/encoding/decoder/ZlibDecoder.java	Sat Jan 04 17:34:01 2020 +0900
@@ -59,7 +59,7 @@
 		} 
 		decoder.setInput(bytes, 0, zippedLength);
 		try {
-			messageDump(new Reader(new ByteArrayInputStream(bytes)), "infrate: ");
+			messageDump(bytes, "infrate: ");
 			decoder.inflate(bytes, zippedLength, length);
 		} catch (DataFormatException e) {
 			throw new TransportException("cannot inflate Zlib data", e);
@@ -85,4 +85,12 @@
 		 }
 		 System.out.println();
 	 }
+
+	 private void messageDump(byte[] bytes, String msg) {
+		 System.out.print(msg);
+		 for (int i = 0; i < 24; i++) {   // 20 + 4
+			 System.out.print(String.format("%02x ", bytes[i]));
+		 }
+		 System.out.println();
+	 }
 }