コード例 #1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public void testOfPathWithCharset() throws Exception
        public virtual void testOfPathWithCharset()
        {
            CharSource charSource = CharSources.ofPath(Paths.get(fileName), Charsets.UTF_16LE);

            assertEquals(charSource.readFirstLine(), "Hello");
            assertEquals(charSource.length(), 5);
        }
コード例 #2
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public void testOfPath() throws Exception
        public virtual void testOfPath()
        {
            CharSource charSource = CharSources.ofPath(Paths.get(fileName));

            assertEquals(charSource.readFirstLine(), "H\u0000e\u0000l\u0000l\u0000o\u0000");
            assertEquals(charSource.length(), 10);
        }