org.apache.activemq.transport.tcp
Class TcpBufferedInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by java.io.FilterInputStream
          extended by org.apache.activemq.transport.tcp.TcpBufferedInputStream
All Implemented Interfaces:
Closeable

public class TcpBufferedInputStream
extends FilterInputStream

An optimized buffered input stream for Tcp


Field Summary
protected  int count
           
protected  byte[] internalBuffer
           
protected  int position
           
 
Fields inherited from class java.io.FilterInputStream
in
 
Constructor Summary
TcpBufferedInputStream(InputStream in)
           
TcpBufferedInputStream(InputStream in, int size)
           
 
Method Summary
 int available()
           
 void close()
           
protected  void fill()
           
 boolean markSupported()
           
 int read()
           
 int read(byte[] b, int off, int len)
           
 long skip(long n)
           
 
Methods inherited from class java.io.FilterInputStream
mark, read, reset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

internalBuffer

protected byte[] internalBuffer

count

protected int count

position

protected int position
Constructor Detail

TcpBufferedInputStream

public TcpBufferedInputStream(InputStream in)

TcpBufferedInputStream

public TcpBufferedInputStream(InputStream in,
                              int size)
Method Detail

fill

protected void fill()
             throws IOException
Throws:
IOException

read

public int read()
         throws IOException
Overrides:
read in class FilterInputStream
Throws:
IOException

read

public int read(byte[] b,
                int off,
                int len)
         throws IOException
Overrides:
read in class FilterInputStream
Throws:
IOException

skip

public long skip(long n)
          throws IOException
Overrides:
skip in class FilterInputStream
Throws:
IOException

available

public int available()
              throws IOException
Overrides:
available in class FilterInputStream
Throws:
IOException

markSupported

public boolean markSupported()
Overrides:
markSupported in class FilterInputStream

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Overrides:
close in class FilterInputStream
Throws:
IOException


Copyright © 2005–2013 The Apache Software Foundation. All rights reserved.