com.lutris.appserver.server.httpPresentation.servlet
Class ServletHttpPresentationInputStream
java.lang.Object
java.io.InputStream
com.lutris.appserver.server.httpPresentation.HttpPresentationInputStream
com.lutris.appserver.server.httpPresentation.servlet.ServletHttpPresentationInputStream
- All Implemented Interfaces:
- java.io.Closeable
public class ServletHttpPresentationInputStream
- extends com.lutris.appserver.server.httpPresentation.HttpPresentationInputStream
HTTP request input stream reader for servlets.
This implements all methods that are defined in InputStream as calles
to the servlet object, since we don't know which ones are implemented by
ServletInputStream.
- See Also:
ServletInputStream
Method Summary |
int |
available()
|
void |
mark(int readlimit)
|
boolean |
markSupported()
|
int |
read()
|
int |
read(byte[] b)
|
int |
read(byte[] b,
int off,
int len)
|
int |
readLine(byte[] b,
int off,
int len)
Starting at the specified offset, reads into the given array of
bytes until all requested bytes have been read or a '\n' is
encountered, in which case the '\n' is read into the array as well. |
void |
reset()
|
long |
skip(long n)
|
Methods inherited from class com.lutris.appserver.server.httpPresentation.HttpPresentationInputStream |
close |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ServletHttpPresentationInputStream
protected ServletHttpPresentationInputStream(javax.servlet.ServletInputStream inputStream)
- Construct an object for accessing a servlet input stream.
readLine
public int readLine(byte[] b,
int off,
int len)
throws java.io.IOException
- Starting at the specified offset, reads into the given array of
bytes until all requested bytes have been read or a '\n' is
encountered, in which case the '\n' is read into the array as well.
- Specified by:
readLine
in class com.lutris.appserver.server.httpPresentation.HttpPresentationInputStream
- Parameters:
b
- the buffer into which the data is readoff
- the start offset of the datalen
- the maximum number of bytes to read
- Returns:
- the actual number of bytes read, or -1 if the end of the
stream is reached
- Throws:
java.io.IOException
- if an I/O error has occurred
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[] b)
throws java.io.IOException
- Overrides:
read
in class java.io.InputStream
- Throws:
java.io.IOException
read
public int read(byte[] b,
int off,
int len)
throws java.io.IOException
- Overrides:
read
in class java.io.InputStream
- Throws:
java.io.IOException
skip
public long skip(long n)
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
mark
public void mark(int readlimit)
- 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