public abstract class AbstractXDIWriter extends Object implements XDIWriter
Modifier and Type | Field and Description |
---|---|
static Charset |
DEFAULT_CHARSET |
protected Properties |
parameters |
Constructor and Description |
---|
AbstractXDIWriter(Properties parameters) |
Modifier and Type | Method and Description |
---|---|
String |
getFileExtension()
Returns the file extension of this XDIWriter, e.g.
|
String |
getFormat()
Returns the format this XDIWriter can write, e.g.
|
MimeType |
getMimeType()
Returns the mime type this XDIWriter can write, e.g.
|
protected void |
init() |
boolean |
isWriteHtml() |
boolean |
isWriteImplied() |
boolean |
isWriteOrdered() |
boolean |
isWritePretty() |
boolean |
supportsFileExtension(String fileExtension)
Checks if a given file extension is supported.
|
boolean |
supportsFormat(String format)
Checks if a given format is supported.
|
boolean |
supportsMimeType(MimeType mimeType)
Checks if a given mime type is supported.
|
OutputStream |
write(ContextNode contextNode,
OutputStream stream)
Writes an XDI context node to a byte stream.
|
Writer |
write(ContextNode contextNode,
Writer writer)
Writes an XDI context node to a character stream.
|
OutputStream |
write(Graph graph,
OutputStream stream)
Writes an XDI graph to a byte stream.
|
public static final Charset DEFAULT_CHARSET
protected Properties parameters
public AbstractXDIWriter(Properties parameters)
protected void init()
public OutputStream write(Graph graph, OutputStream stream) throws IOException
XDIWriter
write
in interface XDIWriter
graph
- A graph that will be written to the stream.stream
- The byte stream to write to.IOException
public OutputStream write(ContextNode contextNode, OutputStream stream) throws IOException
XDIWriter
write
in interface XDIWriter
stream
- The byte stream to write to.IOException
public Writer write(ContextNode contextNode, Writer writer) throws IOException
XDIWriter
write
in interface XDIWriter
contextNode
- A context node that will be written to the stream.writer
- The character stream to write to.IOException
public final String getFormat()
XDIWriter
public final String getFileExtension()
XDIWriter
getFileExtension
in interface XDIWriter
public final MimeType getMimeType()
XDIWriter
getMimeType
in interface XDIWriter
public boolean supportsFormat(String format)
XDIWriter
supportsFormat
in interface XDIWriter
public boolean supportsFileExtension(String fileExtension)
XDIWriter
supportsFileExtension
in interface XDIWriter
public boolean supportsMimeType(MimeType mimeType)
XDIWriter
supportsMimeType
in interface XDIWriter
public boolean isWriteImplied()
public boolean isWriteOrdered()
public boolean isWritePretty()
public boolean isWriteHtml()
Copyright © 2017. All rights reserved.