org.norther.tammi.spray.remote.chain
Class HttpRMIOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by org.norther.tammi.spray.remote.chain.HttpRMIOutputStream
All Implemented Interfaces:
Closeable, Flushable

public class HttpRMIOutputStream
extends OutputStream

An output stream for remote HTTP clients.

Version:
$Id: HttpRMIOutputStream.java,v 1.5 2009/09/28 15:08:29 cvsimp Exp $
Author:
Ilkka Priha

Constructor Summary
HttpRMIOutputStream(HttpRMIClient rc)
          Constructs a new remote output stream.
HttpRMIOutputStream(HttpRMIClient rc, int cap)
          Constructs a new remote output stream with a specified capacity.
 
Method Summary
 void close()
          Closes the stream.
 void flush()
          Flushes the buffer.
 void write(byte[] b)
          Writes bytes.
 void write(byte[] b, int off, int len)
          Writes specific bytes.
 void write(int i)
          Writes a specific byte.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpRMIOutputStream

public HttpRMIOutputStream(HttpRMIClient rc)
Constructs a new remote output stream.

Parameters:
rc - a remote client.

HttpRMIOutputStream

public HttpRMIOutputStream(HttpRMIClient rc,
                           int cap)
Constructs a new remote output stream with a specified capacity.

Parameters:
rc - a remote client.
cap - a capacity.
Method Detail

close

public void close()
           throws IOException
Closes the stream.

Specified by:
close in interface Closeable
Overrides:
close in class OutputStream
Throws:
IOException - on errors.

flush

public void flush()
           throws IOException
Flushes the buffer.

Specified by:
flush in interface Flushable
Overrides:
flush in class OutputStream
Throws:
IOException - on errors.

write

public void write(byte[] b)
           throws IOException
Writes bytes.

Overrides:
write in class OutputStream
Parameters:
b - an arrays of bytes.
Throws:
IOException - on error.

write

public void write(byte[] b,
                  int off,
                  int len)
           throws IOException
Writes specific bytes.

Overrides:
write in class OutputStream
Parameters:
b - an arrays of bytes.
off - an offset.
len - length.
Throws:
IOException - on errors.

write

public void write(int i)
           throws IOException
Writes a specific byte.

Specified by:
write in class OutputStream
Parameters:
i - a byte.
Throws:
IOException - on errors.


Copyright © 2004 The Norther Organization. All rights reserved.