org.apache.jk.common

Class JkInputStream


public class JkInputStream
extends InputStream

Generic input stream impl on top of ajp

Field Summary

static int
H_SIZE
static byte
JK_AJP13_GET_BODY_CHUNK
static int
MAX_PACKET_SIZE
static int
MAX_READ_SIZE

Constructor Summary

JkInputStream()

Method Summary

int
available()
void
close()
int
doRead(ByteChunk responseChunk)
int
doRead1(byte[] b, int off, int len)
void
mark(int readLimit)
boolean
markSupported()
int
read()
int
read(byte[] b)
int
read(byte[] b, int off, int len)
boolean
receive()
Receive a chunk of data.
void
recycle()
Must be called before or after each request
void
reset()
void
setContentLength(int i)
Must be called after the request is parsed, before any input
void
setMsgContext(MsgContext mc)
Must be called when the stream is created
long
skip(long n)

Field Details

H_SIZE

public static final int H_SIZE

Field Value:
4


JK_AJP13_GET_BODY_CHUNK

public static final byte JK_AJP13_GET_BODY_CHUNK

Field Value:
6


MAX_PACKET_SIZE

public static final int MAX_PACKET_SIZE

Field Value:
8192


MAX_READ_SIZE

public static final int MAX_READ_SIZE

Field Value:
8186

Constructor Details

JkInputStream

public JkInputStream()

Method Details

available

public int available()
            throws IOException


close

public void close()
            throws IOException


doRead

public int doRead(ByteChunk responseChunk)
            throws IOException


doRead1

public int doRead1(byte[] b,
                   int off,
                   int len)
            throws IOException


mark

public void mark(int readLimit)


markSupported

public boolean markSupported()


read

public int read()
            throws IOException


read

public int read(byte[] b)
            throws IOException


read

public int read(byte[] b,
                int off,
                int len)
            throws IOException


receive

public boolean receive()
            throws IOException
Receive a chunk of data. Called to implement the 'special' packet in ajp13 and to receive the data after we send a GET_BODY packet


recycle

public void recycle()
Must be called before or after each request


reset

public void reset()
            throws IOException


setContentLength

public void setContentLength(int i)
Must be called after the request is parsed, before any input


setMsgContext

public void setMsgContext(MsgContext mc)
Must be called when the stream is created


skip

public long skip(long n)
            throws IOException


Copyright B) 2000-2003 Apache Software Foundation. All Rights Reserved.