class MetadataServiceImpl implements MetadataServerSideService {

    @Override
    public Path saveMetadata(final Path path,
                             final Metadata metadata,
                             final String comment) {

        try (final InputStream inputStream = ioService.newInputStream(Paths.convert(path), StandardOpenOption.READ)) {

            return Paths.convert(ioService.write(Paths.convert(path),
                                                 IOUtils.toByteArray(inputStream),
                                                 setUpAttributes(path,
                                                                 metadata),
                                                 commentedOptionFactory.makeCommentedOption(comment)));
        } catch (IOException e) {
            throw ExceptionUtilities.handleException(e);
        }
    }

    public  MetadataServiceImpl();
    @Inject public  MetadataServiceImpl(@Named("ioStrategy") IOService ioService,
                               @Named("configIO") IOService configIOService,
                               CommentedOptionFactory commentedOptionFactory,
                               SessionInfo sessionInfo);

}