au.com.lastweekend.cgi
Class FastCGIInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
au.com.lastweekend.cgi.FastCGIInputStream
- All Implemented Interfaces:
- java.io.Closeable
public abstract class FastCGIInputStream
- extends java.io.FilterInputStream
Encapsulates the FastCGI socket protocol which contains fixed length data packets. In each role, WebServer, Responder.
Note that we do not support multiplexed requests on the underlying stream. Streams and sockets are good at that already, we don't
need to re-invent the wheel
- Version:
- $Id$
- Author:
- Grant Gardner grant@lastweekend.com.au
|
Field Summary |
protected static org.slf4j.Logger |
LOG
|
| Fields inherited from class java.io.FilterInputStream |
in |
| Methods inherited from class java.io.FilterInputStream |
close, mark, markSupported, read, reset, skip |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOG
protected static final org.slf4j.Logger LOG
FastCGIInputStream
public FastCGIInputStream(int requestId,
java.io.InputStream in)
readShort
protected static int readShort(byte[] data,
int offset)
readLong
protected static int readLong(byte[] data,
int offset)
read
public int read()
throws java.io.IOException
- Overrides:
read in class java.io.FilterInputStream
- Throws:
java.io.IOException
readData
protected void readData()
throws java.io.IOException
- Throws:
java.io.IOException
getMoreStreamData
protected final void getMoreStreamData()
throws java.io.IOException
- Throws:
java.io.IOException
notifyEndOfStream
protected void notifyEndOfStream(int type)
isStream
protected abstract boolean isStream(int type)
processData
protected abstract void processData(int type,
byte[] contentBuffer,
int contentLength)
throws java.io.IOException
- Throws:
java.io.IOException
setRequestComplete
protected final void setRequestComplete()
atEndOfRequest
protected boolean atEndOfRequest()
available
public int available()
throws java.io.IOException
- Overrides:
available in class java.io.FilterInputStream
- Throws:
java.io.IOException
read
public int read(byte[] b,
int off,
int len)
throws java.io.IOException
- Overrides:
read in class java.io.FilterInputStream
- Throws:
java.io.IOException
readFixedLengthData
protected static int readFixedLengthData(byte[] buffer,
int len,
java.io.InputStream inputStream)
throws java.io.IOException
- Throws:
java.io.IOException
Copyright © 2008. All Rights Reserved.