litesoft
Diff Revisions
947
vs
948
for /trunk/GWT_Sandbox/Upload/src/org/litesoft/sandbox/csapp/server/SmallFileValidator.java
|
@@ -2,23 +2,19 @@ |
2 |
2 |
|
|
3 |
3 |
|
import java.io.*; |
4 |
4 |
|
|
5 |
|
- |
public interface SmallFileValidator |
6 |
|
- |
{ |
7 |
|
- |
class AcceptedResult |
8 |
|
- |
{ |
|
5 |
+ |
public interface SmallFileValidator { |
|
6 |
+ |
class AcceptedResult { |
9 |
7 |
|
private String fileName; |
10 |
8 |
|
private String displayText; |
11 |
9 |
|
private String encodedContents; // displayable 7-bit Ascii (values: 10, 13, & 32 - 126) |
12 |
10 |
|
|
13 |
|
- |
public AcceptedResult( String fileName, String displayText, String encodedContents ) |
14 |
|
- |
{ |
|
11 |
+ |
public AcceptedResult( String fileName, String displayText, String encodedContents ) { |
15 |
12 |
|
this.fileName = fileName; |
16 |
13 |
|
this.displayText = displayText; |
17 |
14 |
|
this.encodedContents = encodedContents; |
18 |
15 |
|
} |
19 |
16 |
|
|
20 |
|
- |
public String getFileName() |
21 |
|
- |
{ |
|
17 |
+ |
public String getFileName() { |
22 |
18 |
|
return fileName; |
23 |
19 |
|
} |
24 |
20 |
|
|
|
@@ -27,8 +23,7 @@ |
27 |
23 |
|
* |
28 |
24 |
|
* @return !null, NewLines and Displayable 7-bit Ascii (decimal 32 thru 126) |
29 |
25 |
|
*/ |
30 |
|
- |
public String getDisplayText() |
31 |
|
- |
{ |
|
26 |
+ |
public String getDisplayText() { |
32 |
27 |
|
return displayText; |
33 |
28 |
|
} |
34 |
29 |
|
|
|
@@ -37,11 +32,11 @@ |
37 |
32 |
|
* |
38 |
33 |
|
* @return !null, Displayable (no spaces) 7-bit Ascii (decimal 33 thru 126) |
39 |
34 |
|
*/ |
40 |
|
- |
public String getEncodedContents() |
41 |
|
- |
{ |
|
35 |
+ |
public String getEncodedContents() { |
42 |
36 |
|
return encodedContents; |
43 |
37 |
|
} |
44 |
38 |
|
} |
45 |
39 |
|
|
46 |
|
- |
AcceptedResult validate( String fileName, byte[] contents ) throws UnsupportedEncodingException; |
|
40 |
+ |
AcceptedResult validate( String fileName, byte[] contents ) |
|
41 |
+ |
throws UnsupportedEncodingException; |
47 |
42 |
|
} |