Class ReaderCache

java.lang.Object
java.io.Reader
java.io.StringReader
org.apache.camel.converter.stream.ReaderCache
All Implemented Interfaces:
Closeable, AutoCloseable, Readable, org.apache.camel.StreamCache

public class ReaderCache extends StringReader implements org.apache.camel.StreamCache
A StreamCache for String Readers.

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

    • ReaderCache

      public ReaderCache(String data)
  • Method Details

    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Overrides:
      close in class StringReader
    • reset

      public void reset()
      Specified by:
      reset in interface org.apache.camel.StreamCache
      Overrides:
      reset in class StringReader
    • 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