Package edu.wpi.grip.ui.util
Class StringInMemoryFile
- java.lang.Object
-
- net.schmizz.sshj.xfer.InMemorySourceFile
-
- edu.wpi.grip.ui.util.StringInMemoryFile
-
- All Implemented Interfaces:
net.schmizz.sshj.xfer.LocalSourceFile
public class StringInMemoryFile extends net.schmizz.sshj.xfer.InMemorySourceFileA "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.
-
-
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.InputStreamgetInputStream()longgetLength()java.lang.StringgetName()intgetPermissions()
-
-
-
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:
getPermissionsin interfacenet.schmizz.sshj.xfer.LocalSourceFile- Overrides:
getPermissionsin classnet.schmizz.sshj.xfer.InMemorySourceFile
-
getInputStream
public java.io.InputStream getInputStream() throws java.io.IOException- Throws:
java.io.IOException
-
-