core/src/test/java/org/apache/commons/vfs2/test/ContentTests.java
/**
     * Tests concurrent reads on a file.
     */
Tests concurrent reads on a file.
Tests concurrent reads on a file .
public void testConcurrentRead() throws Exception
    {
        final FileObject file = getReadFolder().resolveFile("file1.txt");
        assertTrue(file.exists());
        final InputStream instr = file.getContent().getInputStream();
        try
        {
            file.getContent().getInputStream().close();
        }
        finally
        {
            instr.close();
        }
    }
public void testConcurrentRead ( ) throws Exception { final FileObject file = getReadFolder ( ) . resolveFile ( "file1.txt" ) ; assertTrue ( file . exists ( ) ) ; final InputStream instr = file . getContent ( ) . getInputStream ( ) ; try { file . getContent ( ) . getInputStream ( ) . close ( ) ; } finally { instr . close ( ) ; } }
Tests concurrent reads on a file.
Tests concurrent reads on a file .
// Start reading from the file // Start reading again