|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.InputStream
org.jboss.remoting.transport.multiplex.utility.GrowablePipedInputStream
public class GrowablePipedInputStream
GrowablePipedInputStream
is the parent of the
MultiplexingInputStream
returned by
VirtualSocket.getInputStream()
. GrowablePipedInputStream
and
GrowablePipedOutputStream
work together like java.io.PipedInputStream
and java.io.PipedOutputStream
, so that
calling GrowablePipedOutputStream.write()
causes bytes to be deposited with the
matching GrowablePipedInputStream
. However, unlike PipedInputStream
,
GrowablePipedInputStream
stores bytes in a
ShrinkableByteArrayOutputStream
, which
can grow and contract dynamically in response to the number of bytes it contains.
For more information about method behavior, see the java.io.InputStream
javadoc.
Copyright (c) 2005
Field Summary | |
---|---|
protected static org.jboss.logging.Logger |
log
|
Constructor Summary | |
---|---|
GrowablePipedInputStream()
Create a new GrowablePipedInputStream . |
|
GrowablePipedInputStream(GrowablePipedOutputStream source)
Create a new GrowablePipedInputStream . |
|
GrowablePipedInputStream(GrowablePipedOutputStream source,
VirtualSelector virtualSelector)
Create a new GrowablePipedInputStream . |
|
GrowablePipedInputStream(VirtualSelector virtualSelector)
Create a new GrowablePipedInputStream . |
Method Summary | |
---|---|
int |
available()
|
void |
close()
|
protected void |
connect(GrowablePipedOutputStream source)
|
int |
getTimeout()
|
protected boolean |
isConnected()
|
int |
read()
|
int |
read(byte[] bytes)
|
int |
read(byte[] bytes,
int offset,
int length)
|
protected void |
receive(byte[] bytes)
|
protected void |
receive(byte[] bytes,
int offset,
int length)
|
protected void |
receive(int i)
|
void |
register(VirtualSelector virtualSelector,
java.lang.Object attachment)
|
void |
setTimeout(int timeout)
|
Methods inherited from class java.io.InputStream |
---|
mark, markSupported, reset, skip |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final org.jboss.logging.Logger log
Constructor Detail |
---|
public GrowablePipedInputStream()
GrowablePipedInputStream
.
public GrowablePipedInputStream(VirtualSelector virtualSelector)
GrowablePipedInputStream
.
virtualSelector
- public GrowablePipedInputStream(GrowablePipedOutputStream source) throws java.io.IOException
GrowablePipedInputStream
.
src
-
java.io.IOException
public GrowablePipedInputStream(GrowablePipedOutputStream source, VirtualSelector virtualSelector) throws java.io.IOException
GrowablePipedInputStream
.
virtualSelector
- src
-
java.io.IOException
Method Detail |
---|
public int available()
available
in class java.io.InputStream
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in class java.io.InputStream
java.io.IOException
public int getTimeout()
public int read() throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public int read(byte[] bytes) throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public int read(byte[] bytes, int offset, int length) throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public void register(VirtualSelector virtualSelector, java.lang.Object attachment)
public void setTimeout(int timeout)
protected void connect(GrowablePipedOutputStream source) throws java.io.IOException
java.io.IOException
protected boolean isConnected()
protected void receive(int i) throws java.io.IOException
java.io.IOException
protected void receive(byte[] bytes) throws java.io.IOException
java.io.IOException
protected void receive(byte[] bytes, int offset, int length) throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |