TrueZIP Kernel 7.0-rc2

de.schlichtherle.truezip.fs.archive
Class FsArchiveController.Output

java.lang.Object
  extended by de.schlichtherle.truezip.socket.IOSocket<E,Entry>
      extended by de.schlichtherle.truezip.socket.OutputSocket<Entry>
          extended by de.schlichtherle.truezip.fs.archive.FsArchiveController.Output
Enclosing class:
FsArchiveController<E extends FsArchiveEntry>

private class FsArchiveController.Output
extends OutputSocket<Entry>


Field Summary
(package private)  FsEntryName name
           
(package private)  BitField<FsOutputOption> options
           
(package private)  Entry template
           
 
Constructor Summary
FsArchiveController.Output(FsEntryName name, BitField<FsOutputOption> options, Entry template)
           
 
Method Summary
 Entry getLocalTarget()
          Returns the local target for I/O operations.
(package private)  FsArchiveFileSystemOperation<E> mknod()
           
 OutputStream newOutputStream()
          Returns a new output stream for writing bytes to the local target.
 
Methods inherited from class de.schlichtherle.truezip.socket.OutputSocket
bind, getPeerTarget
 
Methods inherited from class de.schlichtherle.truezip.socket.IOSocket
copy, equals, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

name

final FsEntryName name

options

final BitField<FsOutputOption> options

template

@CheckForNull
final Entry template
Constructor Detail

FsArchiveController.Output

FsArchiveController.Output(FsEntryName name,
                           BitField<FsOutputOption> options,
                           @CheckForNull
                           Entry template)
Method Detail

mknod

FsArchiveFileSystemOperation<E> mknod()
                                                       throws IOException
Throws:
IOException

getLocalTarget

public Entry getLocalTarget()
                     throws IOException
Description copied from class: IOSocket
Returns the local target for I/O operations.

Note that this interface contract does not state any other terms or conditions for the returned object. In particular, clients need to consider that multiple invocations of this method could return different objects (e.g. defensive copies) which may even fail the Object.equals(java.lang.Object) test. On the other hand, implementations need to consider that clients could attempt to change the state of the returned object in arbitrary manner. Consequently, the result of doing so is undefined, too. In particular, a subsequent I/O operation may not reflect the change or may even fail. Sub-interfaces or implementations may add additional terms and conditions in order to resolve these potential issues.

Specified by:
getLocalTarget in class IOSocket<Entry,Entry>
Returns:
The local target for I/O operations.
Throws:
IOException

newOutputStream

public OutputStream newOutputStream()
                             throws IOException
Description copied from class: OutputSocket
Returns a new output stream for writing bytes to the local target.

Implementations must enable calling this method any number of times. Furthermore, the returned output stream should not be buffered. Buffering should be addressed by the caller instead - see IOSocket.copy(de.schlichtherle.truezip.socket.InputSocket, de.schlichtherle.truezip.socket.OutputSocket).

Specified by:
newOutputStream in class OutputSocket<Entry>
Returns:
A new output stream.
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.