Class FSTObjectOutputNoShared

java.lang.Object
org.nustaq.serialization.FSTObjectOutput
org.nustaq.serialization.FSTObjectOutputNoShared
All Implemented Interfaces:
DataOutput, ObjectOutput, AutoCloseable

public class FSTObjectOutputNoShared extends FSTObjectOutput
Subclass optimized for "unshared mode". Cycles and Objects referenced more than once will not be detected. Additionally JDK compatibility is not supported (read/writeObject and stuff). Use case is highperformance serialization of plain cycle free data (e.g. messaging). Can perform significantly faster (20-40%).
  • Constructor Details

    • FSTObjectOutputNoShared

      public FSTObjectOutputNoShared(OutputStream out)
      Creates a new FSTObjectOutput stream to write data to the specified underlying output stream. uses Default Configuration singleton
      Parameters:
      out -
    • FSTObjectOutputNoShared

      public FSTObjectOutputNoShared(OutputStream out, FSTConfiguration conf)
      Creates a new FSTObjectOutputNoShared stream to write data to the specified underlying output stream. The counter written is set to zero. Don't create a FSTConfiguration with each stream, just create one global static configuration and reuse it. FSTConfiguration is threadsafe.
      Parameters:
      out - the underlying output stream, to be saved for later use.
      conf -
    • FSTObjectOutputNoShared

      public FSTObjectOutputNoShared(FSTConfiguration conf)
      serialize without an underlying stream, the resulting byte array of writing to this FSTObjectOutput can be accessed using getBuffer(), the size using getWritten().

      Don't create a FSTConfiguration with each stream, just create one global static configuration and reuseit. FSTConfiguration is threadsafe.

      Parameters:
      conf -
    • FSTObjectOutputNoShared

      public FSTObjectOutputNoShared()
      serialize without an underlying stream, the resulting byte array of writing to this FSTObjectOutput can be accessed using getBuffer(), the size using getWritten().

      uses default configuration singleton

  • Method Details