org.schwa.dr
Class Writer
java.lang.Object
org.schwa.dr.Writer
public final class Writer
- extends Object
Writes out docrep documents to the output stream provided in the constructor.
- Author:
- Tim Dawborn
|
Field Summary |
static byte |
WIRE_VERSION
docrep wire protocol version that this writer knows how to write. |
|
Constructor Summary |
Writer(OutputStream out,
DocSchema docSchema)
Constructs a new docrep writer given the output stream and document schema. |
|
Method Summary |
void |
write(Doc doc)
Serialises a docrep document to the wrapped output stream. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WIRE_VERSION
public static final byte WIRE_VERSION
- docrep wire protocol version that this writer knows how to write.
- See Also:
- Constant Field Values
Writer
public Writer(OutputStream out,
DocSchema docSchema)
- Constructs a new docrep writer given the output stream and document schema.
- Parameters:
out - The output stream to write to.docSchema - The DocSchema instance to use for writing. Unlike the other docrep
APIs, this argument cannot be optional as you cannot be the .class attribute
of a generic type due to type erasure.
write
public void write(Doc doc)
throws IOException
- Serialises a docrep document to the wrapped output stream.
- Throws:
IOException
Copyright © 2014. All rights reserved.