Package cds.savot.binary
Class DataBinaryWriter
java.lang.Object
cds.savot.binary.DataBinaryWriter
- All Implemented Interfaces:
SavotDataWriter
,Closeable
,Flushable
,AutoCloseable
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.
- Since:
- 09/2011
- Author:
- Gregory Mantelet
-
Constructor Summary
ConstructorsConstructorDescriptionDataBinaryWriter
(OutputStream rawStream, FieldSet fields) Builds a DataBinaryWriter with no encoding.DataBinaryWriter
(OutputStream rawStream, FieldSet fields, String encoding) Builds a DataBinaryWriter with a particular encoding (base64 or gzip). -
Method Summary
-
Constructor Details
-
DataBinaryWriter
public DataBinaryWriter(OutputStream rawStream, FieldSet fields) throws BinaryInterpreterException, IOException Builds a DataBinaryWriter with no encoding.- Parameters:
rawStream
- Simple output stream.fields
- List of fields metadata (one per cell).- Throws:
BinaryInterpreterException
IOException
- If an error occurs while building the output stream.- See Also:
-
DataBinaryWriter
public DataBinaryWriter(OutputStream rawStream, FieldSet fields, String encoding) throws IOException Builds a DataBinaryWriter with a particular encoding (base64 or gzip).- Parameters:
rawStream
- Simple output stream.fields
- List of fields metadata (one per cell).encoding
- Name of an encoding algorithm (base64, gzip ornull
).- Throws:
IOException
- If an error occurs while building the output stream.- See Also:
-
-
Method Details
-
writeTR
Description copied from interface:SavotDataWriter
Writes the given row.- Specified by:
writeTR
in interfaceSavotDataWriter
- Parameters:
row
- SavotTR- Throws:
IOException
BinaryInterpreterException
-
writeTRSet
Description copied from interface:SavotDataWriter
Writes the given rows.- Specified by:
writeTRSet
in interfaceSavotDataWriter
- Parameters:
rows
- TRSet- Throws:
IOException
BinaryInterpreterException
-
flush
- Specified by:
flush
in interfaceFlushable
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-