Package org.semanticweb.owlapi.io
Class XZStreamDocumentTarget
java.lang.Object
org.semanticweb.owlapi.io.XZStreamDocumentTarget
- All Implemented Interfaces:
AutoCloseable
,OWLOntologyDocumentTarget
public class XZStreamDocumentTarget
extends Object
implements OWLOntologyDocumentTarget, AutoCloseable
An ontology document target which can write to a XZ stream. Notice that this
works best when the output stream is closed explicitly in the client code.
- Since:
- 4.0.2
- Author:
- ses
-
Constructor Summary
ConstructorsConstructorDescriptionXZStreamDocumentTarget
(OutputStream os, int presetLevel) XZStreamDocumentTarget
(OutputStream os, org.tukaani.xz.FilterOptions... filterOptions) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Gets anOutputStream
that can be used to write an ontology to an ontology document.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.semanticweb.owlapi.io.OWLOntologyDocumentTarget
getDocumentIRI, getWriter
-
Constructor Details
-
XZStreamDocumentTarget
- Parameters:
os
- the actual output streamfilterOptions
- XZ filter options to use. If no options are supplied use default LZMA2 Options.
-
XZStreamDocumentTarget
public XZStreamDocumentTarget(OutputStream os, int presetLevel) throws org.tukaani.xz.UnsupportedOptionsException - Parameters:
os
- output stream to wrappresetLevel
- LZMA2 Preset Level to use- Throws:
org.tukaani.xz.UnsupportedOptionsException
- if an unsupported preset level is supplied
-
-
Method Details
-
getOutputStream
Description copied from interface:OWLOntologyDocumentTarget
Gets anOutputStream
that can be used to write an ontology to an ontology document. If none is available, return Optional.absent. Do not call multiple times for the same file: the output file will be opened for write multiple times.- Specified by:
getOutputStream
in interfaceOWLOntologyDocumentTarget
- Returns:
- The output stream
-
close
- Specified by:
close
in interfaceAutoCloseable
- Throws:
Exception
-