SavotDataWriter, java.io.Closeable, java.io.Flushable, java.lang.AutoCloseablepublic final class DataBinaryWriter extends java.lang.Object implements SavotDataWriter
Lets write binary data (that is to say: a votable.resource.table.data.binary node).
NOTE:
Accepted encoding algorithms are: base64, gzip or dynamic.
"dynamic" encoding is accepted but no particular encoding will be applied while writing data. They will be written just in binary.
| Constructor | Description |
|---|---|
DataBinaryWriter(java.io.OutputStream rawStream,
FieldSet fields) |
Builds a DataBinaryWriter with no encoding.
|
DataBinaryWriter(java.io.OutputStream rawStream,
FieldSet fields,
java.lang.String encoding) |
Builds a DataBinaryWriter with a particular encoding (base64 or gzip).
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
close() |
|
void |
flush() |
|
void |
writeTR(SavotTR row) |
Writes the given row.
|
void |
writeTRSet(TRSet rows) |
Writes the given rows.
|
public DataBinaryWriter(java.io.OutputStream rawStream,
FieldSet fields)
throws BinaryInterpreterException,
java.io.IOException
rawStream - Simple output stream.fields - List of fields metadata (one per cell).BinaryInterpreterExceptionjava.io.IOException - If an error occurs while building the output stream.DataBinaryWriter(OutputStream, FieldSet, String)public DataBinaryWriter(java.io.OutputStream rawStream,
FieldSet fields,
java.lang.String encoding)
throws java.io.IOException
rawStream - Simple output stream.fields - List of fields metadata (one per cell).encoding - Name of an encoding algorithm (base64, gzip or null).java.io.IOException - If an error occurs while building the output stream.getEncodedStream(OutputStream, String),
BinaryFieldInterpreter.createInterpreter(SavotField)public void writeTR(SavotTR row) throws java.io.IOException, BinaryInterpreterException
SavotDataWriterwriteTR in interface SavotDataWriterrow - SavotTRjava.io.IOExceptionBinaryInterpreterExceptionpublic void writeTRSet(TRSet rows) throws java.io.IOException, BinaryInterpreterException
SavotDataWriterwriteTRSet in interface SavotDataWriterrows - TRSetjava.io.IOExceptionBinaryInterpreterExceptionpublic void flush()
throws java.io.IOException
flush in interface java.io.Flushablejava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.lang.AutoCloseableclose in interface java.io.Closeablejava.io.IOException