File tree Expand file tree Collapse file tree 1 file changed +31
-2
lines changed
src/ua/at/tsvetkov/data_processor/requests Expand file tree Collapse file tree 1 file changed +31
-2
lines changed Original file line number Diff line number Diff line change 3636 *
3737 * @author lordtao
3838 */
39- public abstract class FileRequest extends Request {
39+ public class FileRequest extends Request {
4040
4141 private FileInputStream inputStream ;
4242
43- protected FileRequest () {
43+ public FileRequest () {
4444
4545 }
4646
47+ /**
48+ * Return new instance of FileRequest.
49+ *
50+ * @return
51+ */
52+ public static FileRequest newInstance () {
53+ return new FileRequest ();
54+ }
55+
4756 /**
4857 * Starts the request and returns a response data as InputStream
4958 *
@@ -56,6 +65,26 @@ public InputStream getInputStream() throws IOException {
5665 return inputStream ;
5766 }
5867
68+ /**
69+ * Set path
70+ *
71+ * @param url
72+ */
73+ public FileRequest setPath (String path ) {
74+ this .path = path ;
75+ return this ;
76+ }
77+
78+ /**
79+ * Set full path
80+ *
81+ * @param url
82+ */
83+ public FileRequest setFullPath (String path ) {
84+ this .url = path ;
85+ return this ;
86+ }
87+
5988 @ Override
6089 public Request build () {
6190 scheme = "" ;
You can’t perform that action at this time.
0 commit comments