TrueZIP Kernel 7.0-rc2

de.schlichtherle.truezip.socket
Class LazyOutputSocket<E extends Entry>

java.lang.Object
  extended by de.schlichtherle.truezip.socket.IOSocket<E,Entry>
      extended by de.schlichtherle.truezip.socket.OutputSocket<E>
          extended by de.schlichtherle.truezip.socket.DecoratingOutputSocket<E>
              extended by de.schlichtherle.truezip.socket.LazyOutputSocket<E>
Type Parameters:
E - The type of the local target.

@NotThreadSafe
public final class LazyOutputSocket<E extends Entry>
extends DecoratingOutputSocket<E>

A lazy output socket provides proxy output streams which acquire their underlying local target upon the first read access.

Author:
Christian Schlichtherle
See Also:
LazyInputSocket

Nested Class Summary
private  class LazyOutputSocket.ProxyOutputStream
           
 
Constructor Summary
LazyOutputSocket(OutputSocket<? extends E> output)
           
 
Method Summary
 OutputStream newOutputStream()
          Returns a proxy output stream which acquires its underlying output stream upon the first read access.
 
Methods inherited from class de.schlichtherle.truezip.socket.DecoratingOutputSocket
getBoundSocket, getLocalTarget, getPeerTarget, toString
 
Methods inherited from class de.schlichtherle.truezip.socket.OutputSocket
bind, connect
 
Methods inherited from class de.schlichtherle.truezip.socket.IOSocket
copy, equals, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LazyOutputSocket

public LazyOutputSocket(@NonNull
                        OutputSocket<? extends E> output)
Method Detail

newOutputStream

public OutputStream newOutputStream()
                             throws IOException
Returns a proxy output stream which acquires its underlying output stream upon the first read access.

Overrides:
newOutputStream in class DecoratingOutputSocket<E extends Entry>
Returns:
A proxy output stream which acquires its underlying output stream upon the first write access.
Throws:
FileNotFoundException - if the local target is not accessible for some reason.
IOException - on any other exceptional condition.

TrueZIP Kernel 7.0-rc2

Copyright © 2005-2011 Schlichtherle IT Services. All Rights Reserved.