Class JBINOutput
java.lang.Object
com.invirgance.convirgance.output.JBINOutput
- All Implemented Interfaces:
Output
Provides support for writing binary encoded JSON data in the JBIN format. Data
can be optionally compressed for lower storage costs in exchange for slower
encoding.
- Author:
- jbanes
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new JBINOutput with compression set to false.JBINOutput(boolean compressed) Creates a new JBINOutput with an option to enable compression -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns true if compression is used when writingvoidsetCompressed(boolean compressed) Enable or disable the usage of compression when writing to a targetObtain an output cursor to manually write data to the output streamMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.invirgance.convirgance.output.Output
getContentType, write
-
Constructor Details
-
JBINOutput
public JBINOutput()Creates a new JBINOutput with compression set to false. -
JBINOutput
public JBINOutput(boolean compressed) Creates a new JBINOutput with an option to enable compression- Parameters:
compressed- true if data should be compressed
-
-
Method Details
-
isCompressed
public boolean isCompressed()Returns true if compression is used when writing- Returns:
- true if compression is enabled, false otherwise
-
setCompressed
public void setCompressed(boolean compressed) Enable or disable the usage of compression when writing to a target- Parameters:
compressed- true to enable compression, false to disable it
-
write
Obtain an output cursor to manually write data to the output stream
-