Class StreamSourceCache

java.lang.Object
javax.xml.transform.stream.StreamSource
org.apache.camel.util.xml.StreamSourceCache
All Implemented Interfaces:
Source, org.apache.camel.StreamCache

public final class StreamSourceCache extends StreamSource implements org.apache.camel.StreamCache
A StreamCache for StreamSources.

Important: All the classes from the Camel release that implements StreamCache is NOT intended for end users to create as instances, but they are part of Camels stream-caching functionality.

  • Constructor Details

    • StreamSourceCache

      public StreamSourceCache(StreamSource source, org.apache.camel.Exchange exchange) throws IOException
      Throws:
      IOException
    • StreamSourceCache

      public StreamSourceCache(org.apache.camel.StreamCache streamCache)
  • Method Details

    • reset

      public void reset()
      Specified by:
      reset in interface org.apache.camel.StreamCache
    • writeTo

      public void writeTo(OutputStream os) throws IOException
      Specified by:
      writeTo in interface org.apache.camel.StreamCache
      Throws:
      IOException
    • copy

      public org.apache.camel.StreamCache copy(org.apache.camel.Exchange exchange) throws IOException
      Specified by:
      copy in interface org.apache.camel.StreamCache
      Throws:
      IOException
    • inMemory

      public boolean inMemory()
      Specified by:
      inMemory in interface org.apache.camel.StreamCache
    • length

      public long length()
      Specified by:
      length in interface org.apache.camel.StreamCache
    • position

      public long position()
      Specified by:
      position in interface org.apache.camel.StreamCache