Class TcpBufferedInputStream
- java.lang.Object
-
- java.io.InputStream
-
- java.io.FilterInputStream
-
- org.apache.activemq.transport.tcp.TcpBufferedInputStream
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class TcpBufferedInputStream extends FilterInputStream
An optimized buffered input stream for Tcp
-
-
Field Summary
Fields Modifier and Type Field Description protected intcountprotected byte[]internalBufferprotected intposition-
Fields inherited from class java.io.FilterInputStream
in
-
-
Constructor Summary
Constructors Constructor Description TcpBufferedInputStream(InputStream in)TcpBufferedInputStream(InputStream in, int size)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intavailable()voidclose()protected voidfill()booleanmarkSupported()intread()intread(byte[] b, int off, int len)longskip(long n)voidunread(byte[] array)-
Methods inherited from class java.io.FilterInputStream
mark, read, reset
-
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
-
-
-
-
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:
readin classFilterInputStream- Throws:
IOException
-
read
public int read(byte[] b, int off, int len) throws IOException- Overrides:
readin classFilterInputStream- Throws:
IOException
-
skip
public long skip(long n) throws IOException- Overrides:
skipin classFilterInputStream- Throws:
IOException
-
available
public int available() throws IOException- Overrides:
availablein classFilterInputStream- Throws:
IOException
-
markSupported
public boolean markSupported()
- Overrides:
markSupportedin classFilterInputStream
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classFilterInputStream- Throws:
IOException
-
unread
public void unread(byte[] array) throws IOException- Parameters:
array-- Throws:
IOException
-
-