Class JsonPipesIpc

java.lang.Object
org.apache.tika.pipes.core.serialization.JsonPipesIpc

public class JsonPipesIpc extends Object
Binary serialization/deserialization for IPC communication between PipesClient and PipesServer.

Uses Jackson's Smile binary format for efficient serialization. Smile is a binary JSON format that is more compact and faster to parse than text JSON, while maintaining full compatibility with the Jackson data binding API.

  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T> T
    fromBytes(byte[] bytes, Class<T> clazz)
    Deserialize Smile binary format bytes to an object.
    static com.fasterxml.jackson.databind.ObjectMapper
    Get the configured ObjectMapper for direct use if needed.
    static byte[]
    Serialize an object to Smile binary format bytes.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • JsonPipesIpc

      public JsonPipesIpc()
  • Method Details

    • toBytes

      public static byte[] toBytes(Object obj) throws IOException
      Serialize an object to Smile binary format bytes.
      Throws:
      IOException
    • fromBytes

      public static <T> T fromBytes(byte[] bytes, Class<T> clazz) throws IOException
      Deserialize Smile binary format bytes to an object.
      Throws:
      IOException
    • getMapper

      public static com.fasterxml.jackson.databind.ObjectMapper getMapper()
      Get the configured ObjectMapper for direct use if needed.