class DropboxWriteFeature extends AbstractHttpWriteFeature<String> {

    @Override
    public HttpResponseOutputStream<String> write(final Path file, final TransferStatus status, final ConnectionCallback callback) throws BackgroundException {
        try {
            final DbxUserFilesRequests files = new DbxUserFilesRequests(session.getClient(file));
            final UploadSessionStartUploader start = files.uploadSessionStart();
            new DefaultStreamCloser().close(start.getOutputStream());
            final String sessionId = start.finish().getSessionId();
            if(log.isDebugEnabled()) {
                log.debug(String.format("Obtained session id %s for upload %s", sessionId, file));
            }
            final UploadSessionAppendV2Uploader uploader = open(files, sessionId, 0L);
            return new SegmentingUploadProxyOutputStream(file, status, files, uploader, sessionId);
        }
        catch(DbxException ex) {
            throw new DropboxExceptionMappingService().map("Upload failed.", ex, file);
        }
    }

    public  DropboxWriteFeature(final DropboxSession session);
    public  DropboxWriteFeature(final DropboxSession session, final Long chunksize);
    public  DropboxWriteFeature(final DropboxSession session, final Find finder, final AttributesFinder attributes, final Long chunksize);

}