Spring Web Services Framework

org.springframework.ws.transport
Class TransportOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by org.springframework.ws.transport.TransportOutputStream
All Implemented Interfaces:
Closeable, Flushable

public abstract class TransportOutputStream
extends OutputStream

A TransportOutputStream is an output stream with MIME input headers. It is used to write WebServiceMessages to a transport.

Since:
1.0.0
Author:
Arjen Poutsma
See Also:
addHeader(String,String)

Constructor Summary
protected TransportOutputStream()
           
 
Method Summary
abstract  void addHeader(String name, String value)
          Adds a header with the given name and value.
 void close()
           
protected abstract  OutputStream createOutputStream()
          Returns the output stream to write to.
 void flush()
           
 void write(byte[] b)
           
 void write(byte[] b, int off, int len)
           
 void write(int b)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransportOutputStream

protected TransportOutputStream()
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)
           throws IOException
Overrides:
write 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(int b)
           throws IOException
Specified by:
write in class OutputStream
Throws:
IOException

addHeader

public abstract void addHeader(String name,
                               String value)
                        throws IOException
Adds a header with the given name and value. This method can be called multiple times, to allow for headers with multiple values.

Parameters:
name - the name of the header
value - the value of the header
Throws:
IOException

createOutputStream

protected abstract OutputStream createOutputStream()
                                            throws IOException
Returns the output stream to write to.

Throws:
IOException

Spring Web Services Framework

Copyright © 2005-2010 The Spring Web Services Framework. All Rights Reserved.