public class Gff3Writer
extends java.lang.Object
implements java.io.Closeable
addFeature(Gff3Feature), directives using addDirective(Gff3Codec.Gff3Directive),
and comments using addComment(String). Note that the version 3 directive is automatically added at creation, so should not be added separately.| Constructor and Description |
|---|
Gff3Writer(java.io.OutputStream stream) |
Gff3Writer(java.nio.file.Path path) |
| Modifier and Type | Method and Description |
|---|---|
void |
addComment(java.lang.String comment)
Add comment line
|
void |
addDirective(Gff3Codec.Gff3Directive directive)
Add a directive
|
void |
addDirective(Gff3Codec.Gff3Directive directive,
java.lang.Object object)
Add a directive with an object
|
void |
addFeature(Gff3Feature feature)
add a feature
|
void |
close() |
protected java.lang.String |
escapeString(java.lang.String s)
escape a String.
|
public Gff3Writer(java.nio.file.Path path)
throws java.io.IOException
java.io.IOExceptionpublic Gff3Writer(java.io.OutputStream stream)
public void addFeature(Gff3Feature feature) throws java.io.IOException
feature - the feature to be addedjava.io.IOExceptionprotected java.lang.String escapeString(java.lang.String s)
encodeString(String)s - the string to be escapedpublic void addDirective(Gff3Codec.Gff3Directive directive, java.lang.Object object) throws java.io.IOException
directive - the directive to be addedobject - the object to be encoded with the directivejava.io.IOExceptionpublic void addDirective(Gff3Codec.Gff3Directive directive) throws java.io.IOException
directive - the directive to be addedjava.io.IOExceptionpublic void addComment(java.lang.String comment)
throws java.io.IOException
comment - the comment line (not including leading #)java.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOException