public class SimpleFileServer
extends java.lang.Thread
Modifier and Type | Class and Description |
---|---|
private class |
SimpleFileServer.ClientThread |
Modifier and Type | Field and Description |
---|---|
private VirtualFileSystem |
fileSystem |
private java.lang.String |
lf |
private int |
port |
private boolean |
printExceptions |
private java.lang.String |
requiredCredentials |
private boolean |
running |
private boolean |
useSSL |
Constructor and Description |
---|
SimpleFileServer(int port,
VirtualFileSystem fileSystem)
Creates a new instance of SimpleFileServer
|
SimpleFileServer(int port,
VirtualFileSystem fileSystem,
boolean useSSL,
java.lang.String credentials) |
SimpleFileServer(java.lang.String port,
VirtualFileSystem fileSystem,
java.lang.String useSSL,
java.lang.String credentials) |
Modifier and Type | Method and Description |
---|---|
static void |
main(java.lang.String[] args) |
static java.lang.String[] |
parseLine(java.io.InputStream in) |
static java.lang.String |
readLine(java.io.InputStream in) |
void |
run() |
void |
setRequiredCredentials(java.lang.String credentials) |
void |
setUseSSL(boolean value) |
void |
start() |
void |
stopServer() |
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, stop, stop, suspend, toString, yield
private int port
private boolean running
private boolean printExceptions
private boolean useSSL
private java.lang.String requiredCredentials
private VirtualFileSystem fileSystem
private java.lang.String lf
public SimpleFileServer(int port, VirtualFileSystem fileSystem)
public SimpleFileServer(java.lang.String port, VirtualFileSystem fileSystem, java.lang.String useSSL, java.lang.String credentials)
public SimpleFileServer(int port, VirtualFileSystem fileSystem, boolean useSSL, java.lang.String credentials)
public void setRequiredCredentials(java.lang.String credentials)
public void setUseSSL(boolean value)
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
public void start()
start
in class java.lang.Thread
public void stopServer()
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public static java.lang.String readLine(java.io.InputStream in) throws java.io.IOException
java.io.IOException
public static java.lang.String[] parseLine(java.io.InputStream in) throws java.io.IOException
java.io.IOException
Copyright 2004-2015 Wandora Team