This is more a Java question, I'm guessing. I have experimented unconvincingly using Apache Commons I/O TeeInputStream, but let me back up...

I just need to, in some cases, consume the input stream:

   // under some condition, look into the flowfile contents to see if
   something's there...
   session.read( flowfile, new InputStreamCallback()
   {
      @Override
   public void process( InputStream( in ) throws IOException
      {
        // read from in..
      }
   } );


then, later (and always) consume it (so, sometimes a second time):

   session.read( flowfile, new InputStreamCallback()
   {
      @Override
      public void process( InputStream( in ) throws IOException
      {
        // read from in..
      }
   } );


Obviously, the content's gone at that point if I've already consumed it.

What should I do here instead? I don't have control over the close(), do I?

Thanks for any comment,

Russ

Reply via email to