|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.io.InputStream
|
+--java.io.FilterInputStream
|
+--wttools.protocols.http.HTTPInputStream
HTTPInputStream.java Created: Mon Sep 17 16:37:47 2001
| Field Summary | |
protected int |
bytes_read
variable bytes_read contains value of
bytes already read for current chunk. |
protected int |
chunk_size
variable chunk_size contains value of
current chunk size in bytes. |
protected int |
dataEncodingType
variable dataEncodingType contains value of |
protected boolean |
debug
variable debug contains value of |
protected static int |
ENC_BINARY
Describe constant ENC_BINARY here. |
protected static int |
ENC_CHUNKED
Describe constant ENC_CHUNKED here. |
protected static int |
ENC_UNKNOWN
Describe constant ENC_UNKNOWN here. |
protected java.util.HashMap |
headers
variable headers contains value of |
protected byte[] |
one_byte
Variable one_byte is an array of one byte
capasity. |
protected float |
readBytes
variable readBytes contains value of |
protected float |
readMilis
variable readMilis contains value of |
| Fields inherited from class java.io.FilterInputStream |
in |
| Constructor Summary | |
HTTPInputStream(java.io.InputStream in)
Creates a new HTTPInputStream instance. |
|
| Method Summary | |
protected void |
deb(java.lang.String str)
deb method performs |
protected java.util.HashMap |
getAllHeaders()
getAllHeaders method performs |
boolean |
isDebug()
Get the value of debug. |
protected void |
raw(java.lang.String str)
raw method performs |
int |
read()
read method performs |
int |
read(byte[] b)
read method performs |
int |
read(byte[] b,
int off,
int len)
read method performs |
protected int |
readBinary(byte[] b,
int off,
int len)
readBinary method performs |
protected int |
readChunked(byte[] b,
int off,
int len)
readChunked method streams chunked data
from http server. |
protected int |
readNextChunkSize()
readNextChunkSize method performs |
void |
setDebug(boolean v)
Set the value of debug. |
| Methods inherited from class java.io.FilterInputStream |
available, close, 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 int ENC_UNKNOWN
ENC_UNKNOWN here.protected static final int ENC_BINARY
ENC_BINARY here.protected static final int ENC_CHUNKED
ENC_CHUNKED here.protected boolean debug
debug contains value ofprotected int dataEncodingType
dataEncodingType contains value ofprotected java.util.HashMap headers
headers contains value ofprotected float readMilis
readMilis contains value ofprotected float readBytes
readBytes contains value ofprotected byte[] one_byte
one_byte is an array of one byte
capasity. All reading should be performed with one method
becouse of problems with different encodings during http
transmision. So it is easier to do all necessary calculations
in one place.protected int chunk_size
chunk_size contains value of
current chunk size in bytes.protected int bytes_read
bytes_read contains value of
bytes already read for current chunk.| Constructor Detail |
public HTTPInputStream(java.io.InputStream in)
HTTPInputStream instance.in - an InputStream value| Method Detail |
public int read()
throws java.io.IOException
read method performsread in class java.io.FilterInputStreamint valuejava.io.IOException - if an error occurs
public int read(byte[] b)
throws java.io.IOException
read method performsread in class java.io.FilterInputStreamb - a byte[] valueint valuejava.io.IOException - if an error occurs
public int read(byte[] b,
int off,
int len)
throws java.io.IOException
read method performsread in class java.io.FilterInputStreamb - a byte[] valueoff - an int valuelen - an int valueint valuejava.io.IOException - if an error occurs
protected int readBinary(byte[] b,
int off,
int len)
throws java.io.IOException
readBinary method performsb - a byte[] valueoff - an int valuelen - an int valueint valuejava.io.IOException - if an error occurs
protected int readChunked(byte[] b,
int off,
int len)
throws java.io.IOException
readChunked method streams chunked data
from http server.b - a byte[] is buffer for storing received
data.off - an int is offset in buffer where to start
storing received data.len - an int is expected data size which should
be stored in given buffer.int returns bytes count stored in given buffer.java.io.IOException - if an error occurs during reading data from
stream.
protected int readNextChunkSize()
throws java.io.IOException
readNextChunkSize method performsint valuejava.io.IOException - if an error occurs
protected java.util.HashMap getAllHeaders()
throws java.io.IOException
getAllHeaders method performsHashMap valuejava.io.IOException - if an error occursprotected void deb(java.lang.String str)
deb method performsstr - a String valueprotected void raw(java.lang.String str)
raw method performsstr - a String valuepublic boolean isDebug()
public void setDebug(boolean v)
v - Value to assign to debug.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||