public class BufferInputStream extends java.io.InputStream implements IBufferHandler
buffer handler that defragments the passed buffers into a continuous byte
sequence which is exposed as an input stream.| Modifier and Type | Field and Description |
|---|---|
static long |
DEFAULT_MILLIS_BEFORE_TIMEOUT |
static long |
DEFAULT_MILLIS_INTERRUPT_CHECK |
static long |
NO_TIMEOUT |
| Constructor and Description |
|---|
BufferInputStream() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected void |
closeChannel()
Subclasses may override.
|
protected boolean |
ensureBuffer() |
java.lang.RuntimeException |
getException() |
long |
getMillisBeforeTimeout() |
long |
getMillisInterruptCheck() |
void |
handleBuffer(IBuffer buffer)
Handles an
IBuffer and optionally releases it. |
boolean |
isCCAM() |
int |
read() |
void |
restartTimeout() |
void |
setException(RemoteException exception) |
java.lang.String |
toString() |
public static final long NO_TIMEOUT
public static final long DEFAULT_MILLIS_BEFORE_TIMEOUT
public static final long DEFAULT_MILLIS_INTERRUPT_CHECK
public boolean isCCAM()
public long getMillisBeforeTimeout()
public long getMillisInterruptCheck()
public void restartTimeout()
public java.lang.RuntimeException getException()
public void setException(RemoteException exception)
public void handleBuffer(IBuffer buffer)
IBufferHandlerIBuffer and optionally 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 to some further party.handleBuffer in interface IBufferHandlerbuffer - The buffer to be handled and otionally released.public int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.InputStreamjava.io.IOExceptionpublic java.lang.String toString()
toString in class java.lang.Objectprotected boolean ensureBuffer()
throws java.io.IOException
java.io.IOExceptionprotected void closeChannel()
Copyright (c) 2004-2019 Eike Stepper (Loehne, Germany) and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html