litesoft
@ 948
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
package org.litesoft.sandbox.csapp.server; import java.io.*; public interface SmallFileValidator { class AcceptedResult { private String fileName; private String displayText; private String encodedContents; // displayable 7-bit Ascii (values: 10, 13, & 32 - 126) public AcceptedResult( String fileName, String displayText, String encodedContents ) { this.fileName = fileName; this.displayText = displayText; this.encodedContents = encodedContents; } public String getFileName() { return fileName; } /** * Get the Displayable Text from the file. * * @return !null, NewLines and Displayable 7-bit Ascii (decimal 32 thru 126) */ public String getDisplayText() { return displayText; } /** * Get the Encoded Contents of the File. * * @return !null, Displayable (no spaces) 7-bit Ascii (decimal 33 thru 126) */ public String getEncodedContents() { return encodedContents; } } AcceptedResult validate( String fileName, byte[] contents ) throws UnsupportedEncodingException; } |