public class BufferInputStream extends 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() |
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) |
String |
toString() |
available, mark, markSupported, read, read, reset, skippublic 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 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 IOException
read in class InputStreamIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class InputStreamIOExceptionprotected boolean ensureBuffer()
throws IOException
IOExceptionprotected void closeChannel()
Copyright (c) 2014 Eike Stepper (Berlin, 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