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 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.