Klasse BufferInputStream

java.lang.Object
java.io.InputStream
org.eclipse.net4j.buffer.BufferInputStream
Alle implementierten Schnittstellen:
Closeable, AutoCloseable, IBufferHandler
Bekannte direkte Unterklassen:
ChannelInputStream

public class BufferInputStream extends InputStream implements IBufferHandler
A buffer handler that defragments the passed buffers into a continuous byte sequence which is exposed as an input stream.
Autor:
Eike Stepper
  • Felddetails

    • NO_TIMEOUT

      public static final long NO_TIMEOUT
      Siehe auch:
    • DEFAULT_MILLIS_BEFORE_TIMEOUT

      public static final long DEFAULT_MILLIS_BEFORE_TIMEOUT
      Siehe auch:
    • DEFAULT_MILLIS_INTERRUPT_CHECK

      public static final long DEFAULT_MILLIS_INTERRUPT_CHECK
      Siehe auch:
  • Konstruktordetails

    • BufferInputStream

      public BufferInputStream()
  • Methodendetails

    • isCCAM

      public boolean isCCAM()
      Seit:
      4.4
    • getMillisBeforeTimeout

      public long getMillisBeforeTimeout()
    • getMillisInterruptCheck

      public long getMillisInterruptCheck()
    • restartTimeout

      public void restartTimeout()
      Seit:
      2.0
    • getException

      public RuntimeException getException()
      Seit:
      2.0
    • setException

      public void setException(RemoteException exception)
      Seit:
      4.0
    • handleBuffer

      public void handleBuffer(IBuffer buffer)
      Beschreibung aus Schnittstelle kopiert: IBufferHandler
      Handles an IBuffer and possibly releases it.

      The implementor of this method takes over the ownership of the buffer. Care must be taken to properly release the buffer if the ownership is not explicitly passed on to some further party.

      Angegeben von:
      handleBuffer in Schnittstelle IBufferHandler
      Parameter:
      buffer - The buffer to be handled.
    • read

      public int read() throws IOException
      Angegeben von:
      read in Klasse InputStream
      Löst aus:
      IOException
    • read

      public int read(byte[] b, int off, int len) throws IOException
      Setzt außer Kraft:
      read in Klasse InputStream
      Löst aus:
      IOException
    • close

      public void close() throws IOException
      Angegeben von:
      close in Schnittstelle AutoCloseable
      Angegeben von:
      close in Schnittstelle Closeable
      Setzt außer Kraft:
      close in Klasse InputStream
      Löst aus:
      IOException
    • toString

      public String toString()
      Setzt außer Kraft:
      toString in Klasse Object
    • ensureBuffer

      protected boolean ensureBuffer() throws IOException
      Löst aus:
      IOException
    • closeChannel

      protected void closeChannel()
      Subclasses may override.
      Seit:
      4.5