Class JBINOutput

java.lang.Object
com.invirgance.convirgance.output.JBINOutput
All Implemented Interfaces:
Output

@Wiring public class JBINOutput extends Object implements 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 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

      public OutputCursor write(Target target)
      Obtain an output cursor to manually write data to the output stream
      Specified by:
      write in interface Output
      Parameters:
      target - a target to which the data will be written
      Returns:
      a cursor to write data to