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.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.
-
-
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()
-
-
-
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 interfacenet.schmizz.sshj.xfer.LocalSourceFile
- Overrides:
getPermissions
in classnet.schmizz.sshj.xfer.InMemorySourceFile
-
getInputStream
public java.io.InputStream getInputStream() throws java.io.IOException
- Throws:
java.io.IOException
-
-