File tree Expand file tree Collapse file tree
okhttps/src/main/java/com/ejlchina/okhttps Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ package com .ejlchina .okhttps ;
2+
3+ import java .io .File ;
4+
5+ /**
6+ * @since 2.5.0 从 HttpTask 中分离
7+ */
8+ public class FilePara {
9+
10+ String type ;
11+ String fileName ;
12+ byte [] content ;
13+ File file ;
14+
15+ public FilePara (String type , String fileName , byte [] content ) {
16+ this .type = type ;
17+ this .fileName = fileName ;
18+ this .content = content ;
19+ }
20+
21+ public FilePara (String type , String fileName , File file ) {
22+ this .type = type ;
23+ this .fileName = fileName ;
24+ this .file = file ;
25+ }
26+
27+ public String getType () {
28+ return type ;
29+ }
30+
31+ public String getFileName () {
32+ return fileName ;
33+ }
34+
35+ public byte [] getContent () {
36+ return content ;
37+ }
38+
39+ public File getFile () {
40+ return file ;
41+ }
42+
43+ @ Override
44+ public String toString () {
45+ return "FilePara{" + "type='" + type + "', fileName='" + fileName + "'}" ;
46+ }
47+
48+ }
Original file line number Diff line number Diff line change @@ -523,42 +523,6 @@ public boolean cancel() {
523523 return false ;
524524 }
525525
526- public static class FilePara {
527-
528- String type ;
529- String fileName ;
530- byte [] content ;
531- File file ;
532-
533- FilePara (String type , String fileName , byte [] content ) {
534- this .type = type ;
535- this .fileName = fileName ;
536- this .content = content ;
537- }
538-
539- FilePara (String type , String fileName , File file ) {
540- this .type = type ;
541- this .fileName = fileName ;
542- this .file = file ;
543- }
544-
545- public String getType () {
546- return type ;
547- }
548-
549- public String getFileName () {
550- return fileName ;
551- }
552-
553- public byte [] getContent () {
554- return content ;
555- }
556-
557- public File getFile () {
558- return file ;
559- }
560- }
561-
562526 protected void registeTagTask (Cancelable canceler ) {
563527 if (tag != null && tagTask == null ) {
564528 tagTask = httpClient .addTagTask (tag , canceler , this );
You can’t perform that action at this time.
0 commit comments