Class FSTObjectOutput

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

public class FSTObjectOutput extends Object implements ObjectOutput
replacement of ObjectOutputStream
  • Field Details

  • Constructor Details

    • FSTObjectOutput

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

      public FSTObjectOutput(OutputStream out, FSTConfiguration conf)
      Creates a new FSTObjectOutput 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.
    • FSTObjectOutput

      public FSTObjectOutput(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 reuse it. FSTConfiguration is threadsafe.
      Parameters:
      conf -
      Throws:
      IOException
    • FSTObjectOutput

      public FSTObjectOutput()
      serialize without an underlying stream, the resulting byte array of writing to this FSTObjectOutput can be accessed using getBuffer(), the size using getWritten(). Note once you call close or flush, the tmp byte array is lost. (grab array before flushing/closing) uses default configuration singleton
      Throws:
      IOException
  • Method Details