 +                if (bioRead > 0) {
 +                    read.set(bioRead);
 +                    buffer.limit(bioRead);
-+                    buffer.get(dst.array(), dst.position(), bioRead);
-+                    dst.position(dst.position() + bioRead);
++                    dst.put(buffer);
 +                }
 +            }
 +        };

+                if (len > buffer.capacity())
+                    throw new RuntimeException("Buffer pool write overflow");
+
+                buffer.put(src.array(), src.position(), len);
+                int netWrote = SSL.writeToBIO(networkBIO, address, len);
+                if (netWrote > -1) {
+                    written.set(netWrote);

+}
+
 #endif
