org.granite.gravity.tomcat
Class ByteArrayCometIO
java.lang.Object
java.io.InputStream
org.granite.gravity.tomcat.ByteArrayCometIO
- All Implemented Interfaces:
- Closeable, CometIO
public class ByteArrayCometIO
- extends InputStream
- implements CometIO
An unsynchronized input/output byte buffer that avoids useless byte array copies.
- Author:
- Franck
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
initialCapacity
protected final int initialCapacity
buf
protected byte[] buf
pos
protected int pos
mark
protected int mark
count
protected int count
ByteArrayCometIO
public ByteArrayCometIO()
ByteArrayCometIO
public ByteArrayCometIO(int initialCapacity)
readFully
public int readFully(InputStream is)
throws IOException
- Specified by:
readFully in interface CometIO
- Throws:
IOException
readAvailable
public boolean readAvailable(InputStream is)
throws IOException
- Specified by:
readAvailable in interface CometIO
- Throws:
IOException
getInputStream
public InputStream getInputStream()
throws IOException
- Specified by:
getInputStream in interface CometIO
- Throws:
IOException
read
public int read()
throws IOException
- Specified by:
read in class InputStream
- Throws:
IOException
read
public int read(byte[] b,
int off,
int len)
- Overrides:
read in class InputStream
skip
public long skip(long n)
- Overrides:
skip in class InputStream
available
public int available()
- Overrides:
available in class InputStream
markSupported
public boolean markSupported()
- Overrides:
markSupported in class InputStream
mark
public void mark(int readAheadLimit)
- Overrides:
mark in class InputStream
reset
public void reset()
- Overrides:
reset in class InputStream
close
public void close()
throws IOException
- Specified by:
close in interface Closeable- Overrides:
close in class InputStream
- Throws:
IOException