+2006-01-26 Konstantin Triger <kostat@mainsoft.com>
+
+ * Connection.cs: TARGET_JVM: catch ObjectDisposedException in addition
+ to ThreadAbortException
+ * SupportClass.cs: TARGET_JVM: optimizing byte[] <-> sbyte[] conversion
+
2005-11-06 Konstantin Triger <kostat@mainsoft.com>
* LdapConnection.cs: TARGET_JVM: create GSSCredential only once, cleanup
// before closing sockets, from shutdown
return;
}
+#if TARGET_JVM
+ catch (ObjectDisposedException)
+ {
+ // we do not support Thread.Abort under java
+ // so we close the stream and the working thread
+ // catches ObjectDisposedException exception
+ return;
+ }
+#endif
catch (System.IO.IOException ioe)
{
[CLSCompliantAttribute(false)]
public static sbyte[] ToSByteArray(byte[] byteArray)
{
+#if TARGET_JVM
+ return vmw.common.TypeUtils.ToSByteArray(byteArray);
+#else
sbyte[] sbyteArray = new sbyte[byteArray.Length];
for(int index=0; index < byteArray.Length; index++)
sbyteArray[index] = (sbyte) byteArray[index];
return sbyteArray;
+#endif
}
/*******************************/
/// <summary>
[CLSCompliantAttribute(false)]
public static byte[] ToByteArray(sbyte[] sbyteArray)
{
+#if TARGET_JVM
+ return (byte[])vmw.common.TypeUtils.ToByteArray(sbyteArray);;
+#else
byte[] byteArray = new byte[sbyteArray.Length];
for(int index=0; index < sbyteArray.Length; index++)
byteArray[index] = (byte) sbyteArray[index];
return byteArray;
+#endif
}
/// <summary>