TrueZIP Kernel 7.0-rc2

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

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

@NotThreadSafe
public final class LazyInputSocket<E extends Entry>
extends DecoratingInputSocket<E>

A lazy input socket provides proxy read only files and input streams which acquire their underlying local target upon the first read access.

Author:
Christian Schlichtherle
See Also:
LazyOutputSocket

Nested Class Summary
private  class LazyInputSocket.ProxyInputStream
           
private  class LazyInputSocket.ProxyReadOnlyFile
           
 
Constructor Summary
LazyInputSocket(InputSocket<? extends E> input)
           
 
Method Summary
 InputStream newInputStream()
          Returns a proxy input stream which acquires its underlying input stream upon the first read access.
 ReadOnlyFile newReadOnlyFile()
          Returns a proxy read only file which acquires its underlying read only file upon the first read access.
 
Methods inherited from class de.schlichtherle.truezip.socket.DecoratingInputSocket
getBoundSocket, getLocalTarget, getPeerTarget, toString
 
Methods inherited from class de.schlichtherle.truezip.socket.InputSocket
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

LazyInputSocket

public LazyInputSocket(@NonNull
                       InputSocket<? extends E> input)
Method Detail

newReadOnlyFile

public ReadOnlyFile newReadOnlyFile()
Returns a proxy read only file which acquires its underlying read only file upon the first read access.

Overrides:
newReadOnlyFile in class DecoratingInputSocket<E extends Entry>
Returns:
A proxy read only file which acquires its underlying read only file upon the first read access.

newInputStream

public InputStream newInputStream()
Returns a proxy input stream which acquires its underlying input stream upon the first read access.

Overrides:
newInputStream in class DecoratingInputSocket<E extends Entry>
Returns:
A proxy input stream which acquires its underlying input stream upon the first read access.

TrueZIP Kernel 7.0-rc2

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