Package com.io7m.changelog.xml.api
Interface CXMLChangelogWriterProviderType
- All Superinterfaces:
CChangelogWriterProviderType
- All Known Implementing Classes:
CXMLChangelogWriters
public interface CXMLChangelogWriterProviderType extends CChangelogWriterProviderType
The type of writer providers.
-
Method Summary
Modifier and Type Method Description CXMLChangelogWriterTypecreate(java.net.URI uri, java.io.OutputStream stream)Create a new writer.default voidwrite(java.nio.file.Path file, java.nio.file.Path fileTemp, CChangelog changelog)Create a new writer, write the contents ofchangelogtofileTempand then atomically renamefileTemptofile.
-
Method Details
-
create
CXMLChangelogWriterType create(java.net.URI uri, java.io.OutputStream stream) throws java.io.IOExceptionDescription copied from interface:CChangelogWriterProviderTypeCreate a new writer.- Specified by:
createin interfaceCChangelogWriterProviderType- Parameters:
uri- The URI of the stream, for diagnostic messagesstream- The stream- Returns:
- A new writer
- Throws:
java.io.IOException- On I/O errors
-
write
default void write(java.nio.file.Path file, java.nio.file.Path fileTemp, CChangelog changelog) throws java.io.IOExceptionCreate a new writer, write the contents ofchangelogtofileTempand then atomically renamefileTemptofile.- Parameters:
file- The output filefileTemp- The temporary output filechangelog- The changelog- Throws:
java.io.IOException- On I/O errors
-