summaryrefslogtreecommitdiff
path: root/java/src
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2001-12-08 23:12:03 +0000
committerMark Spruiell <mes@zeroc.com>2001-12-08 23:12:03 +0000
commit60a34a24ac4980bbcc70867b4efed42bcd4db8b9 (patch)
treedaa6aecfba8cf3664cfca9b5d0d2c0348f97d919 /java/src
parentfixes (diff)
downloadice-60a34a24ac4980bbcc70867b4efed42bcd4db8b9.tar.bz2
ice-60a34a24ac4980bbcc70867b4efed42bcd4db8b9.tar.xz
ice-60a34a24ac4980bbcc70867b4efed42bcd4db8b9.zip
debugging
Diffstat (limited to 'java/src')
-rw-r--r--java/src/IceInternal/ThreadPool.java46
1 files changed, 46 insertions, 0 deletions
diff --git a/java/src/IceInternal/ThreadPool.java b/java/src/IceInternal/ThreadPool.java
index b0c0a1f4dbd..4f94f9ee2cf 100644
--- a/java/src/IceInternal/ThreadPool.java
+++ b/java/src/IceInternal/ThreadPool.java
@@ -596,6 +596,52 @@ public final class ThreadPool
}
}
+ private static void
+ dumpBuffer(java.nio.ByteBuffer buf)
+ {
+ final int inc = 8;
+
+ byte[] data = new byte[buf.remaining()];
+ int pos = buf.position();
+ buf.get(data);
+ buf.position(pos);
+
+ for(int i = 0; i < data.length; i += inc)
+ {
+ for(int j = i ; j - i < inc ; j++)
+ {
+ if(j < data.length)
+ {
+ int n = (int)data[j];
+ if(n < 0)
+ n += 256;
+ String s;
+ if(n < 10)
+ s = " " + n;
+ else if(n < 100)
+ s = " " + n;
+ else
+ s = "" + n;
+ System.out.print(s + " ");
+ }
+ else
+ System.out.print(" ");
+ }
+
+ System.out.print('"');
+
+ for(int j = i; j < data.length && j - i < inc; j++)
+ {
+ if(data[j] >= (byte)32 && data[j] < (byte)127)
+ System.out.print((char)data[j]);
+ else
+ System.out.print('.');
+ }
+
+ System.out.println('"');
+ }
+ }
+
private static final class HandlerInfo
{
java.nio.channels.SelectableChannel fd;