Skip to content

Commit 0b28c44

Browse files
committed
Fixed FileRequest.java
1 parent 00d59e6 commit 0b28c44

File tree

1 file changed

+31
-2
lines changed

1 file changed

+31
-2
lines changed

src/ua/at/tsvetkov/data_processor/requests/FileRequest.java

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,23 @@
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 = "";

0 commit comments

Comments
 (0)