Class FinishableStreamSourceConduit

java.lang.Object
org.xnio.conduits.AbstractConduit<D>
org.xnio.conduits.AbstractSourceConduit<D>
org.xnio.conduits.AbstractStreamSourceConduit<org.xnio.conduits.StreamSourceConduit>
io.undertow.conduits.FinishableStreamSourceConduit
All Implemented Interfaces:
org.xnio.conduits.Conduit, org.xnio.conduits.SourceConduit, org.xnio.conduits.StreamSourceConduit

public final class FinishableStreamSourceConduit extends org.xnio.conduits.AbstractStreamSourceConduit<org.xnio.conduits.StreamSourceConduit>
A conduit that calls a finish listener when there is no data left in the underlying conduit.
Author:
Stuart Douglas
  • Field Summary

    Fields inherited from class org.xnio.conduits.AbstractConduit

    next
  • Constructor Summary

    Constructors
    Constructor
    Description
    FinishableStreamSourceConduit(org.xnio.conduits.StreamSourceConduit next, ConduitListener<? super FinishableStreamSourceConduit> finishListener)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
     
    long
    read(ByteBuffer[] dsts, int offset, int length)
     
    long
    transferTo(long position, long count, FileChannel target)
     
    long
    transferTo(long count, ByteBuffer throughBuffer, org.xnio.channels.StreamSinkChannel target)
     

    Methods inherited from class org.xnio.conduits.AbstractSourceConduit

    awaitReadable, awaitReadable, getReadThread, isReadResumed, isReadShutdown, resumeReads, setReadReadyHandler, suspendReads, terminateReads, wakeupReads

    Methods inherited from class org.xnio.conduits.AbstractConduit

    getWorker

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.xnio.conduits.Conduit

    getWorker

    Methods inherited from interface org.xnio.conduits.SourceConduit

    awaitReadable, awaitReadable, getReadThread, isReadResumed, isReadShutdown, resumeReads, setReadReadyHandler, suspendReads, terminateReads, wakeupReads
  • Constructor Details

  • Method Details

    • transferTo

      public long transferTo(long position, long count, FileChannel target) throws IOException
      Specified by:
      transferTo in interface org.xnio.conduits.StreamSourceConduit
      Overrides:
      transferTo in class org.xnio.conduits.AbstractStreamSourceConduit<org.xnio.conduits.StreamSourceConduit>
      Throws:
      IOException
    • transferTo

      public long transferTo(long count, ByteBuffer throughBuffer, org.xnio.channels.StreamSinkChannel target) throws IOException
      Specified by:
      transferTo in interface org.xnio.conduits.StreamSourceConduit
      Overrides:
      transferTo in class org.xnio.conduits.AbstractStreamSourceConduit<org.xnio.conduits.StreamSourceConduit>
      Throws:
      IOException
    • read

      public long read(ByteBuffer[] dsts, int offset, int length) throws IOException
      Specified by:
      read in interface org.xnio.conduits.StreamSourceConduit
      Overrides:
      read in class org.xnio.conduits.AbstractStreamSourceConduit<org.xnio.conduits.StreamSourceConduit>
      Throws:
      IOException
    • read

      public int read(ByteBuffer dst) throws IOException
      Specified by:
      read in interface org.xnio.conduits.StreamSourceConduit
      Overrides:
      read in class org.xnio.conduits.AbstractStreamSourceConduit<org.xnio.conduits.StreamSourceConduit>
      Throws:
      IOException