|
@@ -1,32 +1,32 @@ |
1 |
|
- |
// This Source Code is in the Public Domain per: http://unlicense.org |
2 |
|
- |
package org.litesoft.servlet.filetransfer; |
3 |
|
- |
|
4 |
|
- |
import org.litesoft.configuration.*; |
5 |
|
- |
import org.litesoft.filesinksource.*; |
6 |
|
- |
import org.litesoft.logger.*; |
7 |
|
- |
import org.litesoft.logger.nonpublic.*; |
8 |
|
- |
import org.litesoft.loggerconfig.*; |
9 |
|
- |
import org.litesoft.servlets.filetransfer.*; |
10 |
|
- |
|
11 |
|
- |
import javax.servlet.*; |
12 |
|
- |
import java.io.*; |
13 |
|
- |
|
14 |
|
- |
public class FileTransferServlet extends AbstractFileTransferServlet { |
15 |
|
- |
@Override |
16 |
|
- |
protected FileSinkAndSourceFactory initialize() |
17 |
|
- |
throws ServletException { |
18 |
|
- |
ConfigurationLoggerMap zLogging = new ConfigurationLoggerMap(); |
19 |
|
- |
|
20 |
|
- |
zLogging.add( AbstractFileTransferServlet.class, LoggerLevel.DEBUG ); |
21 |
|
- |
|
22 |
|
- |
new ServerConfiguration( new MapConfigDataAccessorFactory( "No Config File", zLogging ) ); |
23 |
|
- |
LoggerFactory.init( new ConfigurationLoggerLevel() ); |
24 |
|
- |
String tmpFileTranDir = "/tmpFileTransferDir"; |
25 |
|
- |
File zFile = new File( tmpFileTranDir ); |
26 |
|
- |
if ( !zFile.exists() ) { |
27 |
|
- |
//noinspection ResultOfMethodCallIgnored |
28 |
|
- |
zFile.mkdir(); |
29 |
|
- |
} |
30 |
|
- |
return new FileSystemFileSinkAndSourceFactory( tmpFileTranDir ); |
31 |
|
- |
} |
32 |
|
- |
} |
|
1 |
+ |
// This Source Code is in the Public Domain per: http://unlicense.org |
|
2 |
+ |
package org.litesoft.servlet.filetransfer; |
|
3 |
+ |
|
|
4 |
+ |
import org.litesoft.configuration.*; |
|
5 |
+ |
import org.litesoft.filesinksource.*; |
|
6 |
+ |
import org.litesoft.logger.*; |
|
7 |
+ |
import org.litesoft.logger.nonpublic.*; |
|
8 |
+ |
import org.litesoft.loggerconfig.*; |
|
9 |
+ |
import org.litesoft.servlets.filetransfer.*; |
|
10 |
+ |
|
|
11 |
+ |
import javax.servlet.*; |
|
12 |
+ |
import java.io.*; |
|
13 |
+ |
|
|
14 |
+ |
public class FileTransferServlet extends AbstractFileTransferServlet { |
|
15 |
+ |
@Override |
|
16 |
+ |
protected FileSinkAndSourceFactory initialize() |
|
17 |
+ |
throws ServletException { |
|
18 |
+ |
ConfigurationLoggerMap zLogging = new ConfigurationLoggerMap(); |
|
19 |
+ |
|
|
20 |
+ |
zLogging.add( AbstractFileTransferServlet.class, LoggerLevel.DEBUG ); |
|
21 |
+ |
|
|
22 |
+ |
new ServerConfiguration( new MapConfigDataAccessorFactory( "No Config File", zLogging ) ); |
|
23 |
+ |
LoggerFactory.init( new ConfigurationLoggerLevel() ); |
|
24 |
+ |
String tmpFileTranDir = "/tmpFileTransferDir"; |
|
25 |
+ |
File zFile = new File( tmpFileTranDir ); |
|
26 |
+ |
if ( !zFile.exists() ) { |
|
27 |
+ |
//noinspection ResultOfMethodCallIgnored |
|
28 |
+ |
zFile.mkdir(); |
|
29 |
+ |
} |
|
30 |
+ |
return new FileSystemFileSinkAndSourceFactory( tmpFileTranDir ); |
|
31 |
+ |
} |
|
32 |
+ |
} |