# InMemoryDestFile (sshj 0.5.0 API)
Date: 2011-07-27

## net.schmizz.sshj.xfer
Class InMemoryDestFile

    java.lang.Object
      net.schmizz.sshj.xfer.InMemoryDestFile

All Implemented Interfaces:
  LocalDestFile

    public abstract class InMemoryDestFile

extends Object
implements LocalDestFile

Field Summary
`protected org.slf4j.Logger` `log`

Constructor Summary
`InMemoryDestFile()`

Method Summary
`LocalDestFile` `getChild(String name)`
`LocalDestFile` `getTargetDirectory(String dirname)` Allows caller to express intent that caller expects to write to directory with `dirname`.
`InMemoryDestFile` `getTargetFile(String filename)` Allows caller to express intent that caller expects to write to file with `filename`.
`void` `setLastAccessedTime(long t)` Set the last access time for the underlying file.
`void` `setLastModifiedTime(long t)` Set the last modified time for the underlying file.
`void` `setPermissions(int perms)` Set the permissions for the underlying file.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface net.schmizz.sshj.xfer.LocalDestFile
`getOutputStream`

Field Detail

### log

    protected final org.slf4j.Logger log

Constructor Detail

### InMemoryDestFile

    public InMemoryDestFile()

Method Detail

### getTargetFile

    public InMemoryDestFile getTargetFile(String filename)
                                   throws IOException

  Description copied from interface: `LocalDestFile`
  Allows caller to express intent that caller expects to write to file with `filename`. Based on this information, an implementation may return an alternate file to write to, which should be respected by the caller.

  Specified by:
    `getTargetFile` in interface `LocalDestFile`
  Throws:
    `IOException`

### setLastAccessedTime

    public void setLastAccessedTime(long t)
                             throws IOException

  Description copied from interface: `LocalDestFile`
  Set the last access time for the underlying file.

  Specified by:
    `setLastAccessedTime` in interface `LocalDestFile`
  Parameters:
    `t` - time in seconds since Unix epoch
  Throws:
    `IOException`

### setLastModifiedTime

    public void setLastModifiedTime(long t)
                             throws IOException

  Description copied from interface: `LocalDestFile`
  Set the last modified time for the underlying file.

  Specified by:
    `setLastModifiedTime` in interface `LocalDestFile`
  Parameters:
    `t` - time in seconds since Unix epoch
  Throws:
    `IOException`

### setPermissions

    public void setPermissions(int perms)
                        throws IOException

  Description copied from interface: `LocalDestFile`
  Set the permissions for the underlying file.

  Specified by:
    `setPermissions` in interface `LocalDestFile`
  Parameters:
    `perms` - permissions e.g. 0644
  Throws:
    `IOException`

### getTargetDirectory

    public LocalDestFile getTargetDirectory(String dirname)
                                     throws IOException

  Description copied from interface: `LocalDestFile`
  Allows caller to express intent that caller expects to write to directory with `dirname`. Based on this information, an implementation may return an alternate directory to write to, which should be respected by the caller.

  Specified by:
    `getTargetDirectory` in interface `LocalDestFile`
  Throws:
    `IOException`

### getChild

    public LocalDestFile getChild(String name)

  Specified by:
    `getChild` in interface `LocalDestFile`
  Returns:
    A child file/directory of this directory with given `name`.

Copyright © 2009-2011. All Rights Reserved.