org.sakaiproject.entitybroker.util.http
Class EntityServletInputStream
java.lang.Object
java.io.InputStream
javax.servlet.ServletInputStream
org.sakaiproject.entitybroker.util.http.EntityServletInputStream
- All Implemented Interfaces:
- Closeable
public class EntityServletInputStream
- extends javax.servlet.ServletInputStream
This is a class which allows us to produce and control ServletInputStreams,
normally there is no default implementation available for these for some stupid reason
- Author:
- Aaron Zeckoski (azeckoski @ gmail.com)
| Methods inherited from class javax.servlet.ServletInputStream |
readLine |
EntityServletInputStream
public EntityServletInputStream(InputStream inputStream)
- Creates the SIS from an existing inputstream
- Parameters:
inputStream - the IS to create the SIS from, can be buffered or not
EntityServletInputStream
public EntityServletInputStream(String str)
- Creates the SIS from an existing string
- Parameters:
str - any string
EntityServletInputStream
public EntityServletInputStream(Reader reader)
- Creates the SIS from any existing reader,
note that this is not very efficient as it has to load the full reader into memory
- Parameters:
reader - any reader object, buffered or not
read
public int read()
throws IOException
- Specified by:
read in class InputStream
- Throws:
IOException
available
public int available()
throws IOException
- Overrides:
available in class InputStream
- Throws:
IOException
close
public void close()
throws IOException
- Specified by:
close in interface Closeable- Overrides:
close in class InputStream
- Throws:
IOException
equals
public boolean equals(Object obj)
- Overrides:
equals in class Object
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
mark
public void mark(int readlimit)
- Overrides:
mark in class InputStream
markSupported
public boolean markSupported()
- Overrides:
markSupported in class InputStream
read
public int read(byte[] b,
int off,
int len)
throws IOException
- Overrides:
read in class InputStream
- Throws:
IOException
read
public int read(byte[] b)
throws IOException
- Overrides:
read in class InputStream
- Throws:
IOException
reset
public void reset()
throws IOException
- Overrides:
reset in class InputStream
- Throws:
IOException
skip
public long skip(long n)
throws IOException
- Overrides:
skip in class InputStream
- Throws:
IOException
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2007-2013 CARET, University of Cambridge. All Rights Reserved.