Class StringInMemoryFile

  • All Implemented Interfaces:
    net.schmizz.sshj.xfer.LocalSourceFile

    public class StringInMemoryFile
    extends net.schmizz.sshj.xfer.InMemorySourceFile
    A "file" that can be transfered uses SSHJ's scp routines, but is backed by an in-memory string instead of an actual file. This is used to deploy projects, which may or may not be saved to a file.
    • Field Summary

      • Fields inherited from class net.schmizz.sshj.xfer.InMemorySourceFile

        log
    • Constructor Summary

      Constructors 
      Constructor Description
      StringInMemoryFile​(java.lang.String name, java.lang.String contents)  
      StringInMemoryFile​(java.lang.String name, java.lang.String contents, int permissions)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.io.InputStream getInputStream()  
      long getLength()  
      java.lang.String getName()  
      int getPermissions()  
      • Methods inherited from class net.schmizz.sshj.xfer.InMemorySourceFile

        getChildren, getLastAccessTime, getLastModifiedTime, isDirectory, isFile, providesAtimeMtime
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • StringInMemoryFile

        public StringInMemoryFile​(java.lang.String name,
                                  java.lang.String contents,
                                  int permissions)
        Parameters:
        name - The name of the file.
        contents - The contents of the file.
        permissions - The permissions to use for the file.
      • StringInMemoryFile

        public StringInMemoryFile​(java.lang.String name,
                                  java.lang.String contents)
    • Method Detail

      • getName

        public java.lang.String getName()
      • getLength

        public long getLength()
      • getPermissions

        public int getPermissions()
        Specified by:
        getPermissions in interface net.schmizz.sshj.xfer.LocalSourceFile
        Overrides:
        getPermissions in class net.schmizz.sshj.xfer.InMemorySourceFile
      • getInputStream

        public java.io.InputStream getInputStream()
                                           throws java.io.IOException
        Throws:
        java.io.IOException