//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public void test_toString_bomUtf16LE() throws java.io.IOException
        public virtual void test_toString_bomUtf16LE()
        {
            sbyte[] bytes = new sbyte[] { X_FF, X_FE, (sbyte)'H', X_00, (sbyte)'e', X_00, (sbyte)'l', X_00, (sbyte)'l', X_00, (sbyte)'o', X_00 };
            string  str   = UnicodeBom.ToString(bytes);

            assertEquals(str, "Hello");
        }
        //-------------------------------------------------------------------------
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public void test_toString_noBomUtf8() throws java.io.IOException
        public virtual void test_toString_noBomUtf8()
        {
            sbyte[] bytes = new sbyte[] { (sbyte)'H', (sbyte)'e', (sbyte)'l', (sbyte)'l', (sbyte)'o' };
            string  str   = UnicodeBom.ToString(bytes);

            assertEquals(str, "Hello");
        }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public void test_toString_bomUtf8() throws java.io.IOException
        public virtual void test_toString_bomUtf8()
        {
            sbyte[] bytes = new sbyte[] { unchecked ((sbyte)0xEF), unchecked ((sbyte)0xBB), unchecked ((sbyte)0xBF), (sbyte)'H', (sbyte)'e', (sbyte)'l', (sbyte)'l', (sbyte)'o' };
            string  str   = UnicodeBom.ToString(bytes);

            assertEquals(str, "Hello");
        }
 /// <summary>
 /// Reads the source, converting to UTF-8 using a Byte-Order Mark if available.
 /// </summary>
 /// <returns> the UTF-8 string </returns>
 public string readUtf8UsingBom()
 {
     return(UnicodeBom.ToString(array));
 }