com.cometway.httpd
Class HTTPDecoderStream
java.lang.Object
java.io.InputStream
com.cometway.httpd.HTTPDecoderStream
- All Implemented Interfaces:
- java.io.Closeable
public class HTTPDecoderStream
- extends java.io.InputStream
This extension of InputStream allows only a fixed number of bytes
to be read from the stream before acting as the Stream is empty.
The bytes that are read from this stream are automatically decoded
via HTTP parameter decoding.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
sourceStream
protected java.io.InputStream sourceStream
dataLength
protected int dataLength
count
protected int count
decodePlusSign
public boolean decodePlusSign
HTTPDecoderStream
public HTTPDecoderStream(java.io.InputStream source)
throws java.io.IOException
- Throws:
java.io.IOException
HTTPDecoderStream
public HTTPDecoderStream(java.io.InputStream source,
int length)
throws java.io.IOException
- Throws:
java.io.IOException
read
public int read()
throws java.io.IOException
- Specified by:
read in class java.io.InputStream
- Throws:
java.io.IOException
read
public int read(byte[] buffer)
throws java.io.IOException
- Overrides:
read in class java.io.InputStream
- Throws:
java.io.IOException
read
public int read(byte[] buffer,
int start,
int length)
throws java.io.IOException
- Overrides:
read in class java.io.InputStream
- Throws:
java.io.IOException
skip
public long skip(long i)
throws java.io.IOException
- Overrides:
skip in class java.io.InputStream
- Throws:
java.io.IOException
available
public int available()
throws java.io.IOException
- Overrides:
available in class java.io.InputStream
- Throws:
java.io.IOException
close
public void close()
throws java.io.IOException
- Specified by:
close in interface java.io.Closeable- Overrides:
close in class java.io.InputStream
- Throws:
java.io.IOException
mark
public void mark(int i)
- Overrides:
mark in class java.io.InputStream
reset
public void reset()
throws java.io.IOException
- Overrides:
reset in class java.io.InputStream
- Throws:
java.io.IOException
markSupported
public boolean markSupported()
- Overrides:
markSupported in class java.io.InputStream
main
public static void main(java.lang.String[] args)