public class GenericAnnotationSerializer extends AnnotationSerializer
| Modifier and Type | Class and Description |
|---|---|
class |
GenericAnnotationSerializer.AppendingObjectOutputStream
Turns out, an ObjectOutputStream cannot append to a file.
|
AnnotationSerializer.IntermediateEdge, AnnotationSerializer.IntermediateNode, AnnotationSerializer.IntermediateSemanticGraph| Constructor and Description |
|---|
GenericAnnotationSerializer() |
GenericAnnotationSerializer(boolean compress) |
| Modifier and Type | Method and Description |
|---|---|
Pair<Annotation,InputStream> |
read(InputStream is)
Read a single object from this stream.
|
OutputStream |
write(Annotation corpus,
OutputStream os)
Append a single object to this stream.
|
public GenericAnnotationSerializer(boolean compress)
public GenericAnnotationSerializer()
public OutputStream write(Annotation corpus, OutputStream os) throws IOException
AnnotationSerializerwrite in class AnnotationSerializercorpus - 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 Pair<Annotation,InputStream> read(InputStream is) throws IOException, ClassNotFoundException, ClassCastException
AnnotationSerializerread in class AnnotationSerializeris - 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.