@Override
    public InputStream read(final Path file, final TransferStatus status, final ConnectionCallback callback) throws BackgroundException {
        final SMBSession.DiskShareWrapper share = session.openShare(file);
        try {
            final File entry = share.get().openFile(new SMBPathContainerService(session).getKey(file),
                    Collections.singleton(AccessMask.FILE_READ_DATA),
                    Collections.singleton(FileAttributes.FILE_ATTRIBUTE_NORMAL),
                    Collections.singleton(SMB2ShareAccess.FILE_SHARE_READ),
                    SMB2CreateDisposition.FILE_OPEN,
                    Collections.singleton(SMB2CreateOptions.FILE_NON_DIRECTORY_FILE));
            final InputStream stream = entry.getInputStream();
            if(status.isAppend()) {
                stream.skip(status.getOffset());
            }
            return new SMBInputStream(file, stream, entry);
        }
        catch(SMBRuntimeException e) {
            throw new SMBExceptionMappingService().map("Download {0} failed", e, file);
        }
        catch(IOException e) {
            throw new SMBTransportExceptionMappingService().map("Download {0} failed", e, file);
        }
        finally {
            session.releaseShare(share);
        }
    }
@Test(expected = NotfoundException.class)
    public void testReadNotFound() throws Exception {
        final TransferStatus status = new TransferStatus();
        new SMBReadFeature(session).read(new Path(new DefaultHomeFinderService(session).find(),
                "nosuchname", EnumSet.of(Path.Type.file)), status, new DisabledConnectionCallback());
    }