org.sakaiproject.entitybroker.util.http
Class EntityServletOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by javax.servlet.ServletOutputStream
          extended by org.sakaiproject.entitybroker.util.http.EntityServletOutputStream
All Implemented Interfaces:
Closeable, Flushable

public class EntityServletOutputStream
extends javax.servlet.ServletOutputStream

This allows us to produce and control ServletOutputStreams, normally there is not a default implementation available for these for some crazed reason

Author:
Aaron Zeckoski (azeckoski @ gmail.com)

Nested Class Summary
static class EntityServletOutputStream.WriterOutputStream
          Wrap a Writer as an OutputStream.
 
Constructor Summary
EntityServletOutputStream()
          Create a SOS with a default BOS as the storage mechanism for it
EntityServletOutputStream(OutputStream outputStream)
          Create the SOS from an existing outputstream
EntityServletOutputStream(Writer writer)
          Creates the SOS from an existing writer
 
Method Summary
 void close()
           
 boolean equals(Object obj)
           
 void flush()
           
 int hashCode()
           
 String toString()
           
 void write(byte[] b)
           
 void write(byte[] b, int off, int len)
           
 void write(int b)
           
 
Methods inherited from class javax.servlet.ServletOutputStream
print, print, print, print, print, print, print, println, println, println, println, println, println, println, println
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EntityServletOutputStream

public EntityServletOutputStream()
Create a SOS with a default BOS as the storage mechanism for it


EntityServletOutputStream

public EntityServletOutputStream(OutputStream outputStream)
Create the SOS from an existing outputstream

Parameters:
outputStream - the OS to create the SOS from, can be buffered or not

EntityServletOutputStream

public EntityServletOutputStream(Writer writer)
Creates the SOS from an existing writer

Parameters:
writer - any writer
Method Detail

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Overrides:
close in class OutputStream
Throws:
IOException

flush

public void flush()
           throws IOException
Specified by:
flush in interface Flushable
Overrides:
flush in class OutputStream
Throws:
IOException

write

public void write(byte[] b,
                  int off,
                  int len)
           throws IOException
Overrides:
write in class OutputStream
Throws:
IOException

write

public void write(byte[] b)
           throws IOException
Overrides:
write in class OutputStream
Throws:
IOException

write

public void write(int b)
           throws IOException
Specified by:
write in class OutputStream
Throws:
IOException

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2007-2012 CARET, University of Cambridge. All Rights Reserved.