|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.InputStream org.w3c.www.http.ContentLengthInputStream
public class ContentLengthInputStream
The content length input stream is used internally to return entity bodies.
Field Summary | |
---|---|
protected java.io.InputStream |
in
The original input stream. |
protected int |
length
The number of bytes readable from the above stream. |
protected int |
marklength
The place of a single pending mark. |
protected HttpStreamObserver |
observer
The stream observer, if any. |
Constructor Summary | |
---|---|
ContentLengthInputStream(HttpStreamObserver observer,
java.io.InputStream in,
int length)
|
|
ContentLengthInputStream(java.io.InputStream in,
int length)
Builds a new content-length input stream. |
Method Summary | |
---|---|
int |
available()
|
void |
close()
|
void |
finalize()
Make sure the stream is ultimately closed ! |
void |
mark(int readlimit)
|
boolean |
markSupported()
do we support mark() ? it depends on the underlying InputStream |
int |
read()
|
int |
read(byte[] b,
int off,
int len)
|
void |
reset()
|
long |
skip(long n)
|
Methods inherited from class java.io.InputStream |
---|
read |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.io.InputStream in
protected HttpStreamObserver observer
protected int length
protected int marklength
Constructor Detail |
---|
public ContentLengthInputStream(java.io.InputStream in, int length)
public ContentLengthInputStream(HttpStreamObserver observer, java.io.InputStream in, int length)
Method Detail |
---|
public void mark(int readlimit)
mark
in class java.io.InputStream
public void reset() throws java.io.IOException
reset
in class java.io.InputStream
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in class java.io.InputStream
java.io.IOException
public int read() throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public int read(byte[] b, int off, int len) throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public long skip(long n) throws java.io.IOException
skip
in class java.io.InputStream
java.io.IOException
public int available() throws java.io.IOException
available
in class java.io.InputStream
java.io.IOException
public void finalize()
finalize
in class java.lang.Object
public boolean markSupported()
markSupported
in class java.io.InputStream
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |