Class DJLConverter

java.lang.Object
org.apache.camel.component.djl.DJLConverter

@Converter(generateLoader=true) public class DJLConverter extends Object
Converter methods to convert from / to DJL types.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static ai.djl.modality.audio.Audio
    toAudio(byte[] bytes)
     
    static ai.djl.modality.audio.Audio
    toAudio(File file)
     
    static ai.djl.modality.audio.Audio
    toAudio(InputStream inputStream)
     
    static ai.djl.modality.audio.Audio
    toAudio(Path path)
     
    static byte[]
    toBytes(ai.djl.modality.cv.Image image, org.apache.camel.Exchange exchange)
     
    static ai.djl.modality.cv.Image
    toImage(byte[] bytes)
     
    static ai.djl.modality.cv.Image
    toImage(ai.djl.modality.cv.output.DetectedObjects.DetectedObject detectedObject, org.apache.camel.Exchange exchange)
     
    static ai.djl.modality.cv.Image
    toImage(File file)
     
    static ai.djl.modality.cv.Image
    toImage(InputStream inputStream)
     
    static ai.djl.modality.cv.Image
    toImage(Path path)
     
    static ai.djl.modality.cv.Image[]
    toImages(ai.djl.modality.cv.output.DetectedObjects detectedObjects, org.apache.camel.Exchange exchange)
     

    Methods inherited from class java.lang.Object

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

    • DJLConverter

      public DJLConverter()
  • Method Details

    • toImage

      @Converter public static ai.djl.modality.cv.Image toImage(byte[] bytes) throws IOException
      Throws:
      IOException
    • toImage

      @Converter public static ai.djl.modality.cv.Image toImage(File file) throws IOException
      Throws:
      IOException
    • toImage

      @Converter public static ai.djl.modality.cv.Image toImage(Path path) throws IOException
      Throws:
      IOException
    • toImage

      @Converter public static ai.djl.modality.cv.Image toImage(InputStream inputStream) throws IOException
      Throws:
      IOException
    • toImage

      @Converter public static ai.djl.modality.cv.Image toImage(ai.djl.modality.cv.output.DetectedObjects.DetectedObject detectedObject, org.apache.camel.Exchange exchange)
    • toImages

      @Converter public static ai.djl.modality.cv.Image[] toImages(ai.djl.modality.cv.output.DetectedObjects detectedObjects, org.apache.camel.Exchange exchange)
    • toBytes

      @Converter public static byte[] toBytes(ai.djl.modality.cv.Image image, org.apache.camel.Exchange exchange) throws IOException
      Throws:
      IOException
    • toAudio

      @Converter public static ai.djl.modality.audio.Audio toAudio(byte[] bytes) throws IOException
      Throws:
      IOException
    • toAudio

      @Converter public static ai.djl.modality.audio.Audio toAudio(File file) throws IOException
      Throws:
      IOException
    • toAudio

      @Converter public static ai.djl.modality.audio.Audio toAudio(Path path) throws IOException
      Throws:
      IOException
    • toAudio

      @Converter public static ai.djl.modality.audio.Audio toAudio(InputStream inputStream) throws IOException
      Throws:
      IOException