Skip to content

Commit

Permalink
Remove redundant ContentType
Browse files Browse the repository at this point in the history
  • Loading branch information
nroduit committed Sep 11, 2021
1 parent 571c842 commit 51d0052
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 22 deletions.
8 changes: 8 additions & 0 deletions src/main/java/org/weasis/dicom/web/ContentType.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ public enum ContentType {
this.bulkdataTag = bulkdataTag;
}

public String getType() {
return type;
}

public int getBulkdataTag() {
return bulkdataTag;
}

static ContentType probe(Path path) {
try {
String type = Files.probeContentType(path);
Expand Down
23 changes: 1 addition & 22 deletions src/main/java/org/weasis/dicom/web/DicomStowRS.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,32 +48,11 @@ public class DicomStowRS implements AutoCloseable {
private static final ByteArrayInputStream emptyInputStream =
new ByteArrayInputStream(new byte[] {});

public enum HttpContentType {
DICOM("application/dicom"),
XML("application/dicom+xml"),
JSON("application/dicom+json");

private final String type;

HttpContentType(String type) {
this.type = type;
}

public String getType() {
return type;
}

@Override
public String toString() {
return type;
}
}

private final ContentType contentType;
private final String requestURL;
private final String agentName;
private final Map<String, String> headers;
private final HttpContentType type = HttpContentType.XML;
private final Multipart.ContentType type = Multipart.ContentType.XML;
private final HttpClient client;
private final ExecutorService executorService;

Expand Down

0 comments on commit 51d0052

Please sign in to comment.