core/src/main/java/org/apache/commons/vfs2/tasks/ShowFileTask.java
/**
     * Writes the content of the file to Ant log.
     */
Writes the content of the file to Ant log.
Writes the content of the file to Ant log .
private void logContent(final FileObject file, final String prefix)
        throws Exception
    {
        final InputStream instr = file.getContent().getInputStream();
        try
        {
            final BufferedReader reader = new BufferedReader(new InputStreamReader(instr));
            while (true)
            {
                final String line = reader.readLine();
                if (line == null)
                {
                    break;
                }
                log(prefix + line);
            }
        }
        finally
        {
            instr.close();
        }
    }
private void logContent ( final FileObject file , final String prefix ) throws Exception { final InputStream instr = file . getContent ( ) . getInputStream ( ) ; try { final BufferedReader reader = new BufferedReader ( new InputStreamReader ( instr ) ) ; while ( true ) { final String line = reader . readLine ( ) ; if ( line == null ) { break ; } log ( prefix + line ) ; } } finally { instr . close ( ) ; } }
Writes the content of the file to Ant log.
Writes the content of the file to Ant log .