equal
deleted
inserted
replaced
43 import java.nio.*; |
43 import java.nio.*; |
44 import java.util.Random; |
44 import java.util.Random; |
45 |
45 |
46 public class LargeBufs { |
46 public class LargeBufs { |
47 |
47 |
48 private static boolean debug = false; |
48 private static boolean debug = true; |
49 |
49 |
50 private SSLContext sslc; |
50 private SSLContext sslc; |
51 static private SSLEngine ssle1; // client |
51 static private SSLEngine ssle1; // client |
52 static private SSLEngine ssle2; // server |
52 static private SSLEngine ssle2; // server |
53 |
53 |
295 if (!a.equals(b)) { |
295 if (!a.equals(b)) { |
296 throw new Exception("Data didn't transfer cleanly"); |
296 throw new Exception("Data didn't transfer cleanly"); |
297 } else { |
297 } else { |
298 log("Data transferred cleanly"); |
298 log("Data transferred cleanly"); |
299 } |
299 } |
|
300 |
|
301 a.position(a.limit()); |
|
302 b.position(b.limit()); |
|
303 a.limit(a.capacity()); |
|
304 b.limit(b.capacity()); |
300 } |
305 } |
301 |
306 |
302 private static void log(String str) { |
307 private static void log(String str) { |
303 if (debug) { |
308 if (debug) { |
304 System.out.println(str); |
309 System.out.println(str); |