net.sf.asyncobjects.io
Class BufferedByteOutput

java.lang.Object
  extended by net.sf.asyncobjects.AsyncUnicastServer<O>
      extended by net.sf.asyncobjects.io.BufferedOutput<BinaryData,AByteOutput>
          extended by net.sf.asyncobjects.io.BufferedByteOutput
All Implemented Interfaces:
ACloseable, AsyncObject, ExplicitSharing, AByteOutput, AOutput<BinaryData>

public class BufferedByteOutput
extends BufferedOutput<BinaryData,AByteOutput>
implements AByteOutput

Buffered output. The output waits util data will surpass specified limit, and only after it it writes bulk of the data. The write to underlying stream could be forced with AOutput.flush()


Constructor Summary
BufferedByteOutput(AByteOutput output, int limit)
          A constructor from stream and buffer size
 
Method Summary
 
Methods inherited from class net.sf.asyncobjects.io.BufferedOutput
close, flush, write
 
Methods inherited from class net.sf.asyncobjects.AsyncUnicastServer
dereference, export, isImmediate, myVat, promise
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.asyncobjects.io.AOutput
flush, write
 
Methods inherited from interface net.sf.asyncobjects.ACloseable
close
 
Methods inherited from interface net.sf.asyncobjects.AsyncObject
dereference, isImmediate
 

Constructor Detail

BufferedByteOutput

public BufferedByteOutput(AByteOutput output,
                          int limit)
A constructor from stream and buffer size

Parameters:
output - an underlying output stream
limit - a limit, after limit is surpassed, data is sent to underlying stream


Copyright © 2002-2007 Constantine Plotnikov. All Rights Reserved.