Interface FSTEncoder

All Known Implementing Classes:
FSTBytezEncoder, FSTJsonEncoder, FSTMinBinEncoder, FSTStreamEncoder

public interface FSTEncoder
Created by ruedi on 27.03.14.
  • Method Details

    • setConf

      void setConf(FSTConfiguration conf)
    • writeRawBytes

      void writeRawBytes(byte[] bufferedName, int off, int length) throws IOException
      Throws:
      IOException
    • writePrimitiveArray

      void writePrimitiveArray(Object array, int start, int length) throws IOException
      does not write class tag and length
      Parameters:
      array -
      Throws:
      IOException
    • writeStringUTF

      void writeStringUTF(String str) throws IOException
      Throws:
      IOException
    • writeFShort

      void writeFShort(short c) throws IOException
      Throws:
      IOException
    • writeFChar

      void writeFChar(char c) throws IOException
      Throws:
      IOException
    • writeFByte

      void writeFByte(int v) throws IOException
      Throws:
      IOException
    • writeFInt

      void writeFInt(int anInt) throws IOException
      Throws:
      IOException
    • writeFLong

      void writeFLong(long anInt) throws IOException
      Throws:
      IOException
    • writeFFloat

      void writeFFloat(float value) throws IOException
      Throws:
      IOException
    • writeFDouble

      void writeFDouble(double value) throws IOException
      Throws:
      IOException
    • getWritten

      int getWritten()
    • skip

      void skip(int i)
    • close

      void close() throws IOException
      close and flush to underlying stream if present. The stream is also closed
      Throws:
      IOException
    • reset

      void reset(byte[] out)
    • flush

      void flush() throws IOException
      resets stream (positions are lost)
      Throws:
      IOException
    • writeInt32At

      void writeInt32At(int position, int v)
      used to write uncompressed int (guaranteed length = 4) at a (eventually recent) position
      Parameters:
      position -
      v -
    • setOutstream

      void setOutstream(OutputStream outstream)
      if output stream is null, just encode into a byte array
      Parameters:
      outstream -
    • ensureFree

      void ensureFree(int bytes) throws IOException
      Throws:
      IOException
    • getBuffer

      byte[] getBuffer()
    • registerClass

      void registerClass(Class possible)
    • writeClass

      void writeClass(Class cl)
    • writeClass

      void writeClass(FSTClazzInfo clInf)
    • writeTag

      boolean writeTag(byte tag, Object info, long somValue, Object toWrite, FSTObjectOutput oout) throws IOException
      Throws:
      IOException
    • writeAttributeName

      boolean writeAttributeName(FSTClazzInfo.FSTFieldInfo subInfo, Object value)
    • externalEnd

      void externalEnd(FSTClazzInfo clz)
    • isWritingAttributes

      boolean isWritingAttributes()
    • isPrimitiveArray

      boolean isPrimitiveArray(Object array, Class<?> componentType)
    • isTagMultiDimSubArrays

      boolean isTagMultiDimSubArrays()
    • writeVersionTag

      void writeVersionTag(int version) throws IOException
      Throws:
      IOException
    • isByteArrayBased

      boolean isByteArrayBased()
    • writeArrayEnd

      void writeArrayEnd()
    • writeFieldsEnd

      void writeFieldsEnd(FSTClazzInfo serializationInfo)
    • getConf

      FSTConfiguration getConf()