Class FLEncoder

  • All Implemented Interfaces:
    AutoCloseable
    Direct Known Subclasses:
    JSONEncoder

    public abstract class FLEncoder
    extends C4NativePeer
    Represent the encoder object whose ref is passed as a parameter or returned returned by the Core "init" call. The caller takes ownership of the "managed" version's peer and must call the close() method to release it. The "unmanaged" version's peer belongs to Core: it will be release by the native code.
    • Method Detail

      • getUnmanagedEncoder

        @NonNull
        public static FLEncoder getUnmanagedEncoder​(long peer)
      • getManagedEncoder

        @NonNull
        public static FLEncoder getManagedEncoder()
      • close

        public abstract void close()
      • getArg

        @Nullable
        public Object getArg​(@NonNull
                             String key)
      • writeNull

        public boolean writeNull()
      • writeString

        public boolean writeString​(String value)
      • writeData

        public boolean writeData​(byte[] value)
      • beginDict

        public boolean beginDict​(long reserve)
      • endDict

        public boolean endDict()
      • beginArray

        public boolean beginArray​(long reserve)
      • endArray

        public boolean endArray()
      • writeKey

        public boolean writeKey​(String slice)
      • writeValue

        public boolean writeValue​(@Nullable
                                  Object value)
      • write

        public boolean write​(@Nullable
                             List<?> list)
      • reset

        public void reset()