com.healthmarketscience.rmiio
Class SimpleRemoteOutputStream

java.lang.Object
  extended by com.healthmarketscience.rmiio.RemoteStreamServer<RemoteOutputStreamServer,RemoteOutputStream>
      extended by com.healthmarketscience.rmiio.RemoteOutputStreamServer
          extended by com.healthmarketscience.rmiio.SimpleRemoteOutputStream
All Implemented Interfaces:
RemoteOutputStream, Closeable, Flushable, Serializable, Remote, Unreferenced

public class SimpleRemoteOutputStream
extends RemoteOutputStreamServer

Concrete implementation of a RemoteOutputStreamServer which expects to receive uncompressed data, which it will write directly to the underlying OutputStream.

Author:
James Ahlborn
See Also:
Usage Notes, RemoteStreamServer.writeReplace(), Serialized Form

Field Summary
 
Fields inherited from class com.healthmarketscience.rmiio.RemoteOutputStreamServer
_out, DUMMY_MONITOR
 
Fields inherited from class com.healthmarketscience.rmiio.RemoteStreamServer
_monitor, INITIAL_INVALID_SEQUENCE_ID, INITIAL_VALID_SEQUENCE_ID, LOG
 
Constructor Summary
SimpleRemoteOutputStream(OutputStream out)
           
SimpleRemoteOutputStream(OutputStream out, RemoteStreamMonitor<RemoteOutputStreamServer> monitor)
           
 
Method Summary
protected  void flushImpl()
          Flushes the underlying stream.
 boolean usingGZIPCompression()
          Returns true if the stream is using GZIP compression over the wire.
protected  void writePacket(byte[] packet)
          Writes the given packet to the underlying stream.
 
Methods inherited from class com.healthmarketscience.rmiio.RemoteOutputStreamServer
close, closeImpl, flush, getAsSub, getLock, getOutputStream, getRemoteClass, writePacket
 
Methods inherited from class com.healthmarketscience.rmiio.RemoteStreamServer
abort, checkAborted, close, export, exported, finish, isClosed, unreferenced, writeReplace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleRemoteOutputStream

public SimpleRemoteOutputStream(OutputStream out)

SimpleRemoteOutputStream

public SimpleRemoteOutputStream(OutputStream out,
                                RemoteStreamMonitor<RemoteOutputStreamServer> monitor)
Method Detail

usingGZIPCompression

public boolean usingGZIPCompression()
Description copied from interface: RemoteOutputStream
Returns true if the stream is using GZIP compression over the wire.

Returns:
true iff the stream data is compressed, false otherwise

flushImpl

protected void flushImpl()
                  throws IOException
Description copied from class: RemoteOutputStreamServer
Flushes the underlying stream.

Specified by:
flushImpl in class RemoteOutputStreamServer
Throws:
IOException

writePacket

protected void writePacket(byte[] packet)
                    throws IOException
Description copied from class: RemoteOutputStreamServer
Writes the given packet to the underlying stream. If this stream is using compression, this packet should contain compressed data.

Specified by:
writePacket in class RemoteOutputStreamServer
Throws:
IOException


Copyright © 2006–2016 Health Market Science. All rights reserved.