本文整理汇总了C#中biz.ritter.javapi.GetType方法的典型用法代码示例。如果您正苦于以下问题:C# biz.ritter.javapi.GetType方法的具体用法?C# biz.ritter.javapi.GetType怎么用?C# biz.ritter.javapi.GetType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类biz.ritter.javapi
的用法示例。
在下文中一共展示了biz.ritter.javapi.GetType方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: expose
// throws IOException,
/**
* The utility method for reading the whole input stream into a snapshot
* buffer. To speed up the access it works with an underlying buffer for a
* given {@link java.io.ByteArrayInputStream}.
*
* @param is
* the stream to be read.
* @return the snapshot wrapping the buffer where the bytes are read to.
* @throws UnsupportedOperationException
* if the input stream data cannot be exposed
*/
public static byte[] expose(java.io.InputStream isJ)
{
//UnsupportedOperationException {
if (isJ is ExposedByteArrayInputStream) {
return ((ExposedByteArrayInputStream) isJ).expose();
}
if (isJ.GetType().Equals(typeof (java.io.ByteArrayInputStream))){
return expose((java.io.ByteArrayInputStream) isJ);
}
// We don't know how to do this
throw new java.lang.UnsupportedOperationException();
}
示例2: newInstance
/// <summary>
/// Create new Array of type with giving length
/// </summary>
/// <param name="clazz">type / classe</param>
/// <param name="length">size of array</param>
/// <returns></returns>
public static Object newInstance(java.lang.Class clazz, int length)
{
return System.Array.CreateInstance(clazz.GetType(), length);
}