sandbox/src/main/java/org/apache/commons/vfs2/provider/smb/SmbFileObject.java
/**
     * Creates an input stream to read the file content from.
     */
Creates an input stream to read the file content from.
Creates an input stream to read the file content from .
@Override
    protected InputStream doGetInputStream() throws Exception
    {
        try
        {
            return new SmbFileInputStream(file);
        }
        catch (final SmbException e)
        {
            /**
             * jcifs version has been upgraded from 0.8.3 to 1.3.17 as a API Chance in the libraery
             * getErrorCode has been changed to getNtStatus.
             * Further Information about the error code Please check in [1]             *
             * [1] http://msdn.microsoft.com/en-us/library/ee441884.aspx
             */
            if (e.getNtStatus() == SmbException.NT_STATUS_NO_SUCH_FILE ||
                e.getNtStatus() == SmbException.NT_STATUS_NO_SUCH_DEVICE ||
                e.getNtStatus() == SmbException.NT_STATUS_OBJECT_NAME_NOT_FOUND)
            {
                throw new org.apache.commons.vfs2.FileNotFoundException(getName());
            }
            else if (file.isDirectory())
            {
                throw new FileTypeHasNoContentException(getName());
            }
            throw e;
        }
    }
@ Override protected InputStream doGetInputStream ( ) throws Exception { try { return new SmbFileInputStream ( file ) ; } catch ( final SmbException e ) { /**
             * jcifs version has been upgraded from 0.8.3 to 1.3.17 as a API Chance in the libraery
             * getErrorCode has been changed to getNtStatus.
             * Further Information about the error code Please check in [1]             *
             * [1] http://msdn.microsoft.com/en-us/library/ee441884.aspx
             */ if ( e . getNtStatus ( ) == SmbException . NT_STATUS_NO_SUCH_FILE || e . getNtStatus ( ) == SmbException . NT_STATUS_NO_SUCH_DEVICE || e . getNtStatus ( ) == SmbException . NT_STATUS_OBJECT_NAME_NOT_FOUND ) { throw new org . apache . commons . vfs2 . FileNotFoundException ( getName ( ) ) ; } else if ( file . isDirectory ( ) ) { throw new FileTypeHasNoContentException ( getName ( ) ) ; } throw e ; } }
Creates an input stream to read the file content from.
Creates an input stream to read the file content from .