public abstract class AnnotationSerializer extends Object
| Constructor and Description |
|---|
AnnotationSerializer() |
| Modifier and Type | Method and Description |
|---|---|
abstract Pair<Annotation,InputStream> |
read(InputStream is)
Read a single object from this stream.
|
abstract OutputStream |
write(Annotation corpus,
OutputStream os)
Append a single object to this stream.
|
public abstract OutputStream write(Annotation corpus, OutputStream os) throws IOException
corpus - The document to serialize to the stream.os - The output stream to serialize to.IOException - Thrown if the underlying output stream throws the exception.public abstract Pair<Annotation,InputStream> read(InputStream is) throws IOException, ClassNotFoundException, ClassCastException
is - The input stream to read a document from.IOException - Thrown if the underlying stream throws the exception.ClassNotFoundException - Thrown if an object was read that does not exist in the classpath.ClassCastException - Thrown if the signature of a class changed in way that was incompatible with the serialized document.